pub struct Composition<A>where
A: Applier + 'static,{ /* private fields */ }Implementations§
Source§impl<A> Composition<A>where
A: Applier + 'static,
impl<A> Composition<A>where
A: Applier + 'static,
pub fn new(applier: A) -> Composition<A>
pub fn with_runtime(applier: A, runtime: Runtime) -> Composition<A>
Sourcepub fn root_key(&self) -> Option<u64>
pub fn root_key(&self) -> Option<u64>
Returns the root group key captured from the most recent render() call,
or None before the first render.
pub fn take_root_render_request(&mut self) -> bool
pub fn render( &mut self, key: u64, content: impl FnMut(), ) -> Result<(), NodeError>
Sourcepub fn render_stable(
&mut self,
key: u64,
content: impl FnMut(),
) -> Result<(), NodeError>
pub fn render_stable( &mut self, key: u64, 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: u64,
content: impl FnMut(),
) -> Result<bool, NodeError>
pub fn reconcile( &mut self, key: u64, 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<usize>
pub fn debug_dump_slot_table_groups( &self, ) -> Vec<(usize, u64, Option<usize>, usize)>
pub fn debug_dump_all_slots(&self) -> Vec<(usize, String)>
pub fn slot_table_heap_bytes(&self) -> usize
pub fn debug_slot_table_stats(&self) -> SlotTableDebugStats
pub fn debug_slot_value_type_counts( &self, limit: usize, ) -> Vec<SlotValueTypeDebugStat>
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