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 unusally identical to ChunkItem::asset_ident but can be different when the chunk item content depends on available modules e. g. for chunk loaders.