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
pub fn with_backend( applier: A, runtime: Runtime, backend_kind: SlotBackendKind, ) -> Self
pub fn render( &mut self, key: Key, content: impl FnMut(), ) -> Result<(), NodeError>
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_all_slots(&self) -> Vec<(usize, String)>
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> !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