pub struct DefaultSlotReusePolicy;Expand description
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.
Trait Implementations§
Source§impl Debug for DefaultSlotReusePolicy
impl Debug for DefaultSlotReusePolicy
Source§impl Default for DefaultSlotReusePolicy
impl Default for DefaultSlotReusePolicy
Source§fn default() -> DefaultSlotReusePolicy
fn default() -> DefaultSlotReusePolicy
Returns the “default value” for a type. Read more
Source§impl SlotReusePolicy for DefaultSlotReusePolicy
impl SlotReusePolicy for DefaultSlotReusePolicy
Source§fn get_slots_to_retain(&self, active: &[SlotId]) -> HashSet<SlotId>
fn get_slots_to_retain(&self, active: &[SlotId]) -> HashSet<SlotId>
Returns the subset of slots that should be retained for reuse after the
current measurement pass. Slots that are not part of the returned set
will be disposed.
Source§fn are_compatible(&self, existing: SlotId, requested: SlotId) -> bool
fn are_compatible(&self, existing: SlotId, requested: SlotId) -> bool
Determines whether a node that previously rendered the slot
existing
can be reused when the caller requests requested. Read moreSource§fn register_content_type(&self, _slot_id: SlotId, _content_type: u64)
fn register_content_type(&self, _slot_id: SlotId, _content_type: u64)
Registers the content type for a slot. Read more
Source§fn remove_content_type(&self, _slot_id: SlotId)
fn remove_content_type(&self, _slot_id: SlotId)
Removes the content type for a slot (e.g., when transitioning to None). Read more
Auto Trait Implementations§
impl Freeze for DefaultSlotReusePolicy
impl RefUnwindSafe for DefaultSlotReusePolicy
impl Send for DefaultSlotReusePolicy
impl Sync for DefaultSlotReusePolicy
impl Unpin for DefaultSlotReusePolicy
impl UnwindSafe for DefaultSlotReusePolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more