pub struct MemoryApplier { /* private fields */ }Implementations§
Source§impl MemoryApplier
impl MemoryApplier
pub fn new() -> Self
pub fn slots(&mut self) -> &mut SlotTable
Sourcepub fn scene_node_attached_to(
&mut self,
node_id: NodeId,
root: NodeId,
) -> Option<NodeId>
pub fn scene_node_attached_to( &mut self, node_id: NodeId, root: NodeId, ) -> Option<NodeId>
Drains the parents recorded via Applier::record_structural_change,
keeping only nodes still attached to root (a parent that was itself
removed is covered by its own surviving ancestor’s record). A virtual
parent — a subcompose slot wrapper the render graph never contains —
is reported as its nearest non-virtual ancestor: that is the node
whose graph child set the change altered, and an id the graph cannot
resolve would force the scoped scene update to give up and rebuild.
Resolves a scene-scope candidate the way structural records are
resolved: to its nearest non-virtual ancestor, and only while still
attached to root. A node detached after recording must not reach the
scoped scene update — an id the graph cannot resolve forces it to give
up and rebuild the whole scene.
pub fn take_structural_change_parents_attached_to( &mut self, root: NodeId, ) -> Vec<NodeId> ⓘ
pub fn with_node<N: Node + 'static, R>( &mut self, id: NodeId, f: impl FnOnce(&mut N) -> R, ) -> Result<R, NodeError>
pub fn len(&self) -> usize
pub fn capacity(&self) -> usize
pub fn tombstone_count(&self) -> usize
pub fn freelist_len(&self) -> usize
pub fn debug_recycled_node_count(&self) -> usize
pub fn debug_recycled_node_count_for<N: Node + 'static>(&self) -> usize
pub fn debug_stats(&self) -> MemoryApplierDebugStats
pub fn is_empty(&self) -> bool
pub fn debug_live_node_heap_bytes(&self) -> usize
pub fn debug_recycled_node_heap_bytes(&self) -> usize
pub fn set_runtime_handle(&mut self, handle: RuntimeHandle)
pub fn clear_runtime_handle(&mut self)
pub fn runtime_handle(&self) -> Option<RuntimeHandle>
pub fn dump_tree(&self, root: Option<NodeId>) -> String
Trait Implementations§
Source§impl Applier for MemoryApplier
impl Applier for MemoryApplier
Source§fn record_structural_change(&mut self, parent_id: NodeId)
fn record_structural_change(&mut self, parent_id: NodeId)
parent_id’s child list changed structurally this frame
(insert, remove, move, or reparent). Incremental scene consumers drain
the recorded parents and re-patch those subtrees so removed nodes are
evicted from a persistent render graph even when the frame’s scene
update is otherwise scoped to unrelated dirty nodes.