Trait VcValueTrait

Source
pub trait VcValueTrait:
    NonLocalValue
    + Send
    + Sync
    + 'static {
    type ValueTrait: ?Sized;

    // Required methods
    fn get_trait_type_id() -> TraitTypeId;
    fn get_impl_vtables() -> &'static VTableRegistry<Self::ValueTrait>;
}
Expand description

A trait implemented on all values trait object references that can be put into a Value Cell (Vc<Box<dyn Trait>>).

Required Associated Types§

Required Methods§

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl VcValueTrait for Box<dyn ValueDebug>

Source§

impl VcValueTrait for Box<dyn ValueDefault>

Source§

impl VcValueTrait for Box<dyn ValueToString>

Source§

impl VcValueTrait for Box<dyn Effect>

Source§

type ValueTrait = dyn Effect

Source§

fn get_trait_type_id() -> TraitTypeId

Source§

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

Implementors§