Skip to main content

VersionedContent

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, returned by Asset::versioned_content.

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 Dynamic<Box<dyn ValueDebug>> for Box<dyn VersionedContent>

Available on debug-assertions enabled only.
Source§

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

Source§

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

Source§

impl TraitVtablePrototype for Box<dyn VersionedContent>

Source§

const LEN: usize = 3usize

Source§

const DEFAULTS: &[Option<&NativeFunction>]

Source§

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

Available on debug-assertions enabled only.
Source§

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

Source§

impl Upcast<Box<dyn VersionedContent>> for VersionedAssetContent

Source§

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

Source§

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

Available on debug-assertions enabled only.
Source§

impl UpcastStrict<Box<dyn VersionedContent>> for VersionedAssetContent

Source§

impl UpcastStrict<Box<dyn VersionedContent>> for Box<dyn MergeableVersionedContent>

Source§

impl VcValueTrait for Box<dyn VersionedContent>

Source§

const IMPL_VTABLES: &'static VTableRegistry<Self::ValueTrait>

The per-trait vtable registry, populated by [crate::value_type::register_all_trait_methods] Read more
Source§

type ValueTrait = dyn VersionedContent

Source§

fn get_trait_type_id() -> TraitTypeId

Returns the type id of the trait object.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl VersionedContent for VersionedAssetContent

Source§

impl<T> VersionedContent for T
where T: Dynamic<Box<dyn VersionedContent>> + Send + Sync + NonLocalValue + ValueDebug,