pub struct Composition<A: Applier + 'static> { /* private fields */ }Implementations§
Source§impl<A: Applier + 'static> Composition<A>
impl<A: Applier + 'static> Composition<A>
pub fn new(applier: A) -> Self
pub fn with_runtime(applier: A, runtime: Runtime) -> Self
Sourcepub fn root_key(&self) -> Option<Key>
pub fn root_key(&self) -> Option<Key>
Returns the root group key captured from the most recent render() call,
or None before the first render.
pub fn set_retention_policy(&self, policy: RetentionPolicy)
pub fn take_root_render_request(&mut self) -> bool
pub fn render( &mut self, key: Key, content: impl FnMut(), ) -> Result<(), NodeError>
Sourcepub fn render_stable(
&mut self,
key: Key,
content: impl FnMut(),
) -> Result<(), NodeError>
pub fn render_stable( &mut self, key: Key, content: impl FnMut(), ) -> Result<(), NodeError>
Perform a root render and continue replaying any resulting root-render requests until the composition reaches a stable fixpoint.
Sourcepub fn reconcile(
&mut self,
key: Key,
content: impl FnMut(),
) -> Result<bool, NodeError>
pub fn reconcile( &mut self, key: Key, content: impl FnMut(), ) -> Result<bool, NodeError>
Process invalid scopes and any resulting root-render requests until the composition reaches a stable fixpoint for the supplied root content.
Sourcepub fn should_render(&self) -> bool
pub fn should_render(&self) -> bool
Returns true if composition needs to process invalid scopes (recompose).
This checks both:
has_updates(): composition scopes that were invalidated by state changesneeds_frame(): animation callbacks that may have pending work
Note: For scroll performance, ensure scroll state changes use Cell
pub fn runtime_handle(&self) -> RuntimeHandle
pub fn applier_mut(&mut self) -> ApplierGuard<'_, A>
pub fn root(&self) -> Option<NodeId>
pub fn debug_dump_slot_table_groups( &self, ) -> Vec<(usize, Key, Option<usize>, usize)>
pub fn debug_dump_slot_entries(&self) -> Vec<SlotDebugEntry>
pub fn slot_table_heap_bytes(&self) -> usize
pub fn debug_slot_table_stats(&self) -> SlotTableDebugStats
pub fn debug_slot_snapshot(&self) -> SlotDebugSnapshot
pub fn debug_observer_stats(&self) -> SnapshotStateObserverDebugStats
pub fn debug_last_pass_stats(&self) -> CompositionPassDebugStats
pub fn process_invalid_scopes(&mut self) -> Result<bool, NodeError>
pub fn flush_pending_node_updates(&mut self) -> Result<(), NodeError>
Trait Implementations§
Auto Trait Implementations§
impl<A> Freeze for Composition<A>
impl<A> !RefUnwindSafe for Composition<A>
impl<A> !Send for Composition<A>
impl<A> !Sync for Composition<A>
impl<A> Unpin for Composition<A>
impl<A> UnsafeUnpin for Composition<A>
impl<A> !UnwindSafe for Composition<A>
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