Module subcompose

Module subcompose 

Source
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§

ContentTypeReusePolicy
Reuse policy that allows cross-slot reuse when content types match.
DefaultSlotReusePolicy
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.
SubcomposeState
Tracks the state of nodes produced by subcomposition, enabling reuse between measurement passes.

Traits§

SlotReusePolicy
Policy that decides which previously composed slots should be retained for potential reuse during the next subcompose pass.