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>>,
) -> 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>>,
) -> 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>>,
) -> Vc<Box<dyn Chunk>>where
Self: Sized,
Create a new chunk for the given chunk items
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,
Trait Implementations§
Source§impl VcValueTrait for Box<dyn ChunkType>
impl VcValueTrait for Box<dyn ChunkType>
Source§const IMPL_VTABLES: &'static VTableRegistry<Self::ValueTrait>
const IMPL_VTABLES: &'static VTableRegistry<Self::ValueTrait>
The per-trait vtable registry, populated at program load by
#[ctor::ctor]
functions emitted by each #[turbo_tasks::value_impl] expansion. Read moretype ValueTrait = dyn ChunkType
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 ChunkType>> for Box<dyn ChunkType>
impl Dynamic<Box<dyn ValueDebug>> for Box<dyn ChunkType>
Available on debug-assertions enabled only.
impl Dynamic<Box<dyn ValueToString>> for Box<dyn ChunkType>
impl Upcast<Box<dyn ChunkType>> for Box<dyn ChunkType>
impl Upcast<Box<dyn ValueDebug>> for Box<dyn ChunkType>
Available on debug-assertions enabled only.
impl Upcast<Box<dyn ValueToString>> for Box<dyn ChunkType>
impl UpcastStrict<Box<dyn ValueDebug>> for Box<dyn ChunkType>
Available on debug-assertions enabled only.