Trait Version

Source
pub trait Version:
    Send
    + Sync
    + NonLocalValue
    + ValueDebug {
    // Required method
    fn id(self: Vc<Self>) -> Vc<RcStr>
       where Self: Sized;
}
Expand description

Describes the current version of an object, and how to update them from an earlier version.

Important: Implementations must not contain instances of Vc! This should describe a specific version, and the value of a Vc can change due to invalidations or cache eviction.

Required Methods§

Source

fn id(self: Vc<Self>) -> Vc<RcStr>
where Self: Sized,

Get a unique identifier of the version as a string. There is no way to convert an id back to its original Version, so the original object needs to be stored somewhere.

Trait Implementations§

Source§

impl VcValueTrait for Box<dyn Version>

Source§

type ValueTrait = dyn Version

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 Version>

Source§

impl Dynamic<Box<dyn Version>> for Box<dyn Version>

Source§

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

Source§

impl Upcast<Box<dyn Version>> for Box<dyn Version>

Implementors§