Expand description
State tracking for measure-time subcomposition.
The SubcomposeState keeps book of which slots are active, which nodes can
be reused, and which precompositions need to be disposed. Reuse follows a
two-phase lookup: first SlotIds that match exactly are preferred. If no
exact match exists, the SlotReusePolicy is consulted to determine whether
a node produced for another slot is compatible with the requested slot.
Structs§
- Content
Type Reuse Policy - Reuse policy that allows cross-slot reuse when content types match.
- Default
Slot Reuse Policy - Default reuse policy that mirrors Jetpack Compose behaviour: dispose everything from the tail so that the next measurement can decide which content to keep alive. Compatibility defaults to exact slot matches.
- SlotId
- Identifier for a subcomposed slot.
- Subcompose
Disposal - Evicted roots and the slot state that stays alive until their nodes are disposed.
Pass this batch to
crate::Composer::dispose_subcomposed_nodes. - Subcompose
State - Tracks the state of nodes produced by subcomposition, enabling reuse between measurement passes.
- Typed
Slot - A slot with the content type registered for it, if any: what a
SlotReusePolicydecides reuse by.
Traits§
- Slot
Reuse Policy - Policy that decides which previously composed slots should be retained for potential reuse during the next subcompose pass.
Type Aliases§
- Debug
Slot Group - One group of a slot table, for debugging: the group index, its call site key, its scope id and the length of its subtree.