Trait VersionedContent

Source
pub trait VersionedContent:
    Send
    + Sync
    + NonLocalValue
    + ValueDebug {
    // Required methods
    fn content(self: Vc<Self>) -> Vc<AssetContent>
       where Self: Sized;
    fn version(self: Vc<Self>) -> Vc<Box<dyn Version>>
       where Self: Sized;

    // Provided method
    fn update(self: Vc<Self>, from: Vc<Box<dyn Version>>) -> Vc<Update>
       where Self: Sized { ... }
}
Expand description

The content of an [Asset] alongside its version.

Required Methods§

Source

fn content(self: Vc<Self>) -> Vc<AssetContent>
where Self: Sized,

The content of the [Asset].

Source

fn version(self: Vc<Self>) -> Vc<Box<dyn Version>>
where Self: Sized,

Get a Version implementor that contains enough information to identify and diff a future VersionedContent against it.

Provided Methods§

Source

fn update(self: Vc<Self>, from: Vc<Box<dyn Version>>) -> Vc<Update>
where Self: Sized,

Describes how to update the content from an earlier version to the latest available one.

Trait Implementations§

Implementors§