pub trait ChunkType:
ValueToString
+ Send
+ Sync
+ NonLocalValue
+ ValueDebug {
// Required methods
fn is_style(self: Vc<Self>) -> Vc<bool>
where Self: Sized;
fn chunk(
self: Vc<Self>,
chunking_context: Vc<Box<dyn ChunkingContext>>,
chunk_items: Vec<ChunkItemOrBatchWithAsyncModuleInfo>,
batch_groups: Vec<Vc<ChunkItemBatchGroup>>,
referenced_output_assets: Vc<OutputAssets>,
) -> Vc<Box<dyn Chunk>>
where Self: Sized;
fn chunk_item_size(
self: Vc<Self>,
chunking_context: Vc<Box<dyn ChunkingContext>>,
chunk_item: Vc<Box<dyn ChunkItem>>,
async_module_info: Option<Vc<AsyncModuleInfo>>,
) -> Vc<usize>
where Self: Sized;
}
Required Methods§
Sourcefn is_style(self: Vc<Self>) -> Vc<bool>where
Self: Sized,
fn is_style(self: Vc<Self>) -> Vc<bool>where
Self: Sized,
Whether the source (reference) order of items needs to be retained during chunking.
Sourcefn chunk(
self: Vc<Self>,
chunking_context: Vc<Box<dyn ChunkingContext>>,
chunk_items: Vec<ChunkItemOrBatchWithAsyncModuleInfo>,
batch_groups: Vec<Vc<ChunkItemBatchGroup>>,
referenced_output_assets: Vc<OutputAssets>,
) -> Vc<Box<dyn Chunk>>where
Self: Sized,
fn chunk(
self: Vc<Self>,
chunking_context: Vc<Box<dyn ChunkingContext>>,
chunk_items: Vec<ChunkItemOrBatchWithAsyncModuleInfo>,
batch_groups: Vec<Vc<ChunkItemBatchGroup>>,
referenced_output_assets: Vc<OutputAssets>,
) -> Vc<Box<dyn Chunk>>where
Self: Sized,
Create a new chunk for the given chunk items