pub trait ChunkItem:
OutputAssetsReference
+ Send
+ Sync
+ NonLocalValue
+ ValueDebug {
// Required methods
fn asset_ident(self: Vc<Self>) -> Vc<AssetIdent>
where Self: Sized;
fn ty(&self) -> Vc<Box<dyn ChunkType>>;
fn module(self: Vc<Self>) -> Vc<Box<dyn Module>>
where Self: Sized;
fn chunking_context(&self) -> Vc<Box<dyn ChunkingContext>>;
// Provided method
fn content_ident(self: Vc<Self>) -> Vc<AssetIdent>
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 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<Box<dyn ChunkingContext>>
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.
Trait Implementations§
Source§impl VcValueTrait for Box<dyn ChunkItem>
impl VcValueTrait for Box<dyn ChunkItem>
Source§const IMPL_VTABLES: &'static VTableRegistry<Self::ValueTrait>
const IMPL_VTABLES: &'static VTableRegistry<Self::ValueTrait>
The per-trait vtable registry, populated by [crate::value_type::register_all_trait_methods] Read more
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.
impl Dynamic<Box<dyn ChunkItem>> for Box<dyn ChunkItem>
impl Dynamic<Box<dyn OutputAssetsReference>> for Box<dyn ChunkItem>
impl Dynamic<Box<dyn ValueDebug>> for Box<dyn ChunkItem>
Available on debug-assertions enabled only.
impl Upcast<Box<dyn ChunkItem>> for Box<dyn ChunkItem>
impl Upcast<Box<dyn OutputAssetsReference>> for Box<dyn ChunkItem>
impl Upcast<Box<dyn ValueDebug>> for Box<dyn ChunkItem>
Available on debug-assertions enabled only.
impl UpcastStrict<Box<dyn OutputAssetsReference>> for Box<dyn ChunkItem>
impl UpcastStrict<Box<dyn ValueDebug>> for Box<dyn ChunkItem>
Available on debug-assertions enabled only.