pub trait ChunkItem:
Send
+ Sync
+ NonLocalValue
+ ValueDebug {
// Required methods
fn asset_ident(self: Vc<Self>) -> Vc<AssetIdent>
where Self: Sized;
fn ty(self: Vc<Self>) -> Vc<Box<dyn ChunkType>>
where Self: Sized;
fn module(self: Vc<Self>) -> Vc<Box<dyn Module>>
where Self: Sized;
fn chunking_context(self: Vc<Self>) -> Vc<Box<dyn ChunkingContext>>
where Self: Sized;
// Provided methods
fn content_ident(self: Vc<Self>) -> Vc<AssetIdent>
where Self: Sized { ... }
fn references(self: Vc<Self>) -> Vc<OutputAssets>
where Self: Sized { ... }
}
Required Methods§
Sourcefn asset_ident(self: Vc<Self>) -> Vc<AssetIdent>where
Self: Sized,
fn asset_ident(self: Vc<Self>) -> Vc<AssetIdent>where
Self: Sized,
The AssetIdent of the Module that this ChunkItem was created from. For most chunk types this must uniquely identify the chunk item at runtime as it’s the source of the module id used at runtime.
Sourcefn ty(self: Vc<Self>) -> Vc<Box<dyn ChunkType>>where
Self: Sized,
fn ty(self: Vc<Self>) -> Vc<Box<dyn ChunkType>>where
Self: Sized,
The type of chunk this item should be assembled into.
Sourcefn module(self: Vc<Self>) -> Vc<Box<dyn Module>>where
Self: Sized,
fn module(self: Vc<Self>) -> Vc<Box<dyn Module>>where
Self: Sized,
A temporary method to retrieve the module associated with this ChunkItem. TODO: Remove this as part of the chunk refactoring.
fn chunking_context(self: Vc<Self>) -> Vc<Box<dyn ChunkingContext>>where
Self: Sized,
Provided Methods§
Sourcefn content_ident(self: Vc<Self>) -> Vc<AssetIdent>where
Self: Sized,
fn content_ident(self: Vc<Self>) -> Vc<AssetIdent>where
Self: Sized,
A AssetIdent that uniquely identifies the content of this ChunkItem. It is usually identical to ChunkItem::asset_ident but can be different when the chunk item content depends on available modules e. g. for chunk loaders.
Sourcefn references(self: Vc<Self>) -> Vc<OutputAssets>where
Self: Sized,
fn references(self: Vc<Self>) -> Vc<OutputAssets>where
Self: Sized,
Trait Implementations§
Source§impl VcValueTrait for Box<dyn ChunkItem>
impl VcValueTrait for Box<dyn ChunkItem>
type ValueTrait = dyn ChunkItem
Source§fn get_trait_type_id() -> TraitTypeId
fn get_trait_type_id() -> TraitTypeId
Returns the type id of the trait object.
Source§fn get_impl_vtables() -> &'static VTableRegistry<Self::ValueTrait>
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.