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§

Source§

impl VcValueTrait for Box<dyn VersionedContent>

Source§

type ValueTrait = dyn VersionedContent

Source§

fn get_trait_type_id() -> TraitTypeId

Returns the type id of the trait object.
Source§

fn get_impl_vtables() -> &'static VTableRegistry<Self::ValueTrait>

Returns the vtable for an implementation of this trait. Panics if ValueTypeId does not implement the trait.
Source§

impl Dynamic<Box<dyn ValueDebug>> for Box<dyn VersionedContent>

Source§

impl Dynamic<Box<dyn VersionedContent>> for Box<dyn VersionedContent>

Source§

impl Upcast<Box<dyn ValueDebug>> for Box<dyn VersionedContent>

Source§

impl Upcast<Box<dyn VersionedContent>> for Box<dyn VersionedContent>

Implementors§