Trait Asset

Source
pub trait Asset:
    Send
    + Sync
    + NonLocalValue
    + ValueDebug {
    // Required method
    fn content(self: Vc<Self>) -> Vc<AssetContent>
       where Self: Sized;

    // Provided method
    fn versioned_content(self: Vc<Self>) -> Vc<Box<dyn VersionedContent>>
       where Self: Sized { ... }
}
Expand description

An asset. It also forms a graph when following [Asset::references].

Required Methods§

Source

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

The content of the Asset.

Provided Methods§

Source

fn versioned_content(self: Vc<Self>) -> Vc<Box<dyn VersionedContent>>
where Self: Sized,

The content of the Asset alongside its version.

Trait Implementations§

Source§

impl VcValueTrait for Box<dyn Asset>

Source§

type ValueTrait = dyn Asset

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 Asset>> for Box<dyn Asset>

Source§

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

Source§

impl Upcast<Box<dyn Asset>> for Box<dyn Asset>

Source§

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

Implementors§