Trait Chunk

Source
pub trait Chunk:
    Send
    + Sync
    + NonLocalValue
    + ValueDebug {
    // Required methods
    fn ident(self: Vc<Self>) -> Vc<AssetIdent>
       where Self: Sized;
    fn chunking_context(self: Vc<Self>) -> Vc<Box<dyn ChunkingContext>>
       where Self: Sized;

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

A Chunk group chunk items together into something that will become an [OutputAsset]. It usually contains multiple chunk items.

Required Methods§

Source

fn ident(self: Vc<Self>) -> Vc<AssetIdent>
where Self: Sized,

Source

fn chunking_context(self: Vc<Self>) -> Vc<Box<dyn ChunkingContext>>
where Self: Sized,

Provided Methods§

Source

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

Other [OutputAsset]s referenced from this Chunk.

Source

fn chunk_items(self: Vc<Self>) -> Vc<ChunkItems>
where Self: Sized,

Trait Implementations§

Source§

impl VcValueTrait for Box<dyn Chunk>

Source§

type ValueTrait = dyn Chunk

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

Source§

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

Source§

impl Upcast<Box<dyn Chunk>> for Box<dyn Chunk>

Source§

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

Implementors§

Source§

impl<T> Chunk for T