pub struct RetainedLayerRegistry { /* private fields */ }Expand description
Bounded registry tracking retained page/scroll layers, focus, and animation timelines across route transitions.
Implementations§
Source§impl RetainedLayerRegistry
Bounded retained scroll-layer capture, restoration, and target-page pre-warming for RetainedLayerRegistry.
impl RetainedLayerRegistry
Bounded retained scroll-layer capture, restoration, and target-page pre-warming for RetainedLayerRegistry.
Sourcepub fn get_layer(&self, route_key: &str) -> Option<RetainedScrollLayer>
pub fn get_layer(&self, route_key: &str) -> Option<RetainedScrollLayer>
Sourcepub fn remove_layer(&mut self, route_key: &str) -> bool
pub fn remove_layer(&mut self, route_key: &str) -> bool
Sourcepub fn capture_page_state(
&mut self,
tree: &mut SceneTree,
route_key: &str,
wrapper: NodeId,
timeline_secs: f64,
) -> RetainedScrollLayer
pub fn capture_page_state( &mut self, tree: &mut SceneTree, route_key: &str, wrapper: NodeId, timeline_secs: f64, ) -> RetainedScrollLayer
Captures a leaving page’s scroll offsets, focused descendant, and active descendant animation timelines without resetting them.
§Arguments
&Self- Mutable registry.&mut SceneTree- Mutable scene tree.&str- Canonical route path of the leaving page.NodeId- OuterScrollViewwrapper node handle.f64- Current page animation timeline clock in seconds.
§Returns
RetainedScrollLayer- Captured retained layer snapshot.
Sourcepub fn restore_page_state(
&mut self,
tree: &mut SceneTree,
route_key: &str,
) -> Option<RetainedScrollLayer>
pub fn restore_page_state( &mut self, tree: &mut SceneTree, route_key: &str, ) -> Option<RetainedScrollLayer>
Restores a frozen page’s retained scroll offsets, input focus, and suspended animation timelines when switching back to route_key.
§Arguments
&Self- Mutable registry.&mut SceneTree- Mutable scene tree.&str- Canonical route path of the entering page.
§Returns
Option<RetainedScrollLayer>- Updated retained layer snapshot after reuse, orNonewhen not cached.
Sourcepub fn prewarm_page_resources(
&mut self,
tree: &SceneTree,
route_key: &str,
wrapper: NodeId,
sample_texts: &[&str],
) -> PagePrewarmReport
pub fn prewarm_page_resources( &mut self, tree: &SceneTree, route_key: &str, wrapper: NodeId, sample_texts: &[&str], ) -> PagePrewarmReport
Pre-warms layout node inspection, glyph text samples, and retained scroll layer registration for route_key.
§Arguments
&Self- Mutable registry.&SceneTree- Scene tree containing the target page wrapper.&str- Canonical route path being pre-warmed.NodeId- Target page outer wrapper node handle.&[&str]- Additional representative text labels to warm into glyph shaping caches.
§Returns
PagePrewarmReport- Summary of warmed nodes, glyphs, and retained scroll layer reuse.
Source§impl RetainedLayerRegistry
impl RetainedLayerRegistry
pub fn get_next_generation(&self) -> u64
pub fn get_touch_clock(&self) -> u64
pub fn get_total_reuse_hits(&self) -> u64
pub fn get_total_prewarms(&self) -> u64
Trait Implementations§
Source§impl Clone for RetainedLayerRegistry
impl Clone for RetainedLayerRegistry
Source§impl Debug for RetainedLayerRegistry
impl Debug for RetainedLayerRegistry
Auto Trait Implementations§
impl Forget for RetainedLayerRegistry
impl Freeze for RetainedLayerRegistry
impl Move for RetainedLayerRegistry
impl RefUnwindSafe for RetainedLayerRegistry
impl Send for RetainedLayerRegistry
impl Sync for RetainedLayerRegistry
impl Unpin for RetainedLayerRegistry
impl UnsafeUnpin for RetainedLayerRegistry
impl UnwindSafe for RetainedLayerRegistry
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