Trait OutputAsset

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

    // Provided methods
    fn references(self: Vc<Self>) -> Vc<OutputAssets>
       where Self: Sized { ... }
    fn size_bytes(self: Vc<Self>) -> Vc<Option<u64>>
       where Self: Sized { ... }
}
Expand description

An asset that should be outputted, e. g. written to disk or served from a server.

Required Methods§

Source

fn path(self: Vc<Self>) -> Vc<FileSystemPath>
where Self: Sized,

The identifier of the OutputAsset. It’s expected to be unique and capture all properties of the OutputAsset.

Provided Methods§

Source

fn references(self: Vc<Self>) -> Vc<OutputAssets>
where Self: Sized,

Other references OutputAssets from this OutputAsset.

Source

fn size_bytes(self: Vc<Self>) -> Vc<Option<u64>>
where Self: Sized,

Trait Implementations§

Source§

impl VcValueTrait for Box<dyn OutputAsset>

Source§

type ValueTrait = dyn OutputAsset

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

Source§

impl Dynamic<Box<dyn OutputAsset>> for Box<dyn OutputAsset>

Source§

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

Source§

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

Source§

impl Upcast<Box<dyn OutputAsset>> for Box<dyn OutputAsset>

Source§

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

Implementors§