pub struct EuvRouter { /* private fields */ }Expand description
Production cross-platform UI router with reactive history stack, lazy page mounting, and PageRetention lifecycle management.
Implementations§
Source§impl EuvRouter
History stack navigation, pattern matching, lazy page lifecycle, and system-back integration for EuvRouter.
impl EuvRouter
History stack navigation, pattern matching, lazy page lifecycle, and system-back integration for EuvRouter.
Sourcepub fn prewarm_page_resources(
&self,
route_key: &str,
scene: &SceneHandle,
wrapper: NodeId,
sample_texts: &[&str],
) -> PagePrewarmReport
pub fn prewarm_page_resources( &self, route_key: &str, scene: &SceneHandle, wrapper: NodeId, sample_texts: &[&str], ) -> PagePrewarmReport
Pre-warms target-page layout nodes, glyph samples, and retained scroll layer state for route_key.
§Arguments
&Self- Router reference.&str- Canonical target route path.&SceneHandle- Active retained scene handle.NodeId- Target page outer wrapper node handle.&[&str]- Optional representative text labels to warm into glyph caches.
§Returns
PagePrewarmReport- Summary of warmed nodes, glyphs, and retained scroll layer reuse.
Sourcepub fn retained_layer(&self, route_key: &str) -> Option<RetainedScrollLayer>
pub fn retained_layer(&self, route_key: &str) -> Option<RetainedScrollLayer>
Sourcepub fn retained_layer_reuse_count(&self) -> u64
pub fn retained_layer_reuse_count(&self) -> u64
Sourcepub fn retained_layer_prewarm_count(&self) -> u64
pub fn retained_layer_prewarm_count(&self) -> u64
Sourcepub fn with_default_retention(self, retention: PageRetention) -> Self
pub fn with_default_retention(self, retention: PageRetention) -> Self
Sourcepub fn route<CallbackFn>(
self,
pattern: &str,
title: &str,
builder: CallbackFn,
) -> Self
pub fn route<CallbackFn>( self, pattern: &str, title: &str, builder: CallbackFn, ) -> Self
Registers a declarative route pattern (supporting :param segments) with a lazy page builder.
§Arguments
Self- Source router.&str- Route pattern (e.g."/media"or"/items/:id").&str- Human-readable page title.CallbackFn- Lazy page builder receiving&EuvRouteMatch.
§Returns
Self- Router with the route registered.
Sourcepub fn route_with_retention<CallbackFn>(
self,
pattern: &str,
title: &str,
retention: PageRetention,
builder: CallbackFn,
) -> Self
pub fn route_with_retention<CallbackFn>( self, pattern: &str, title: &str, retention: PageRetention, builder: CallbackFn, ) -> Self
Registers a declarative route with an explicit PageRetention policy override (Destroy, Freeze, or Alive).
§Arguments
Self- Source router.&str- Route pattern.&str- Human-readable page title.PageRetention- Explicit retention strategy when leaving this route.CallbackFn- Lazy page builder receiving&EuvRouteMatch.
§Returns
Self- Router with the route registered.
Sourcepub fn route_component<CodeValue, CallbackFn>(
self,
pattern: &str,
title: &str,
factory: CallbackFn,
) -> Self
pub fn route_component<CodeValue, CallbackFn>( self, pattern: &str, title: &str, factory: CallbackFn, ) -> Self
Registers a typed Component page factory whose Lifecycle::retention_policy drives freeze/destroy/alive behavior.
§Arguments
Self- Source router.&str- Route pattern.&str- Human-readable page title.CallbackFn- Lazy factory constructing aComponentpage instance.
§Returns
Self- Router with the typed component route registered.
Sourcepub fn with_dynamic_hub(self, hub: DynamicUpdateHub) -> Self
pub fn with_dynamic_hub(self, hub: DynamicUpdateHub) -> Self
Sourcepub fn push(&self, path: &str)
pub fn push(&self, path: &str)
Pushes path onto the navigation history stack (no-op if already on path).
§Arguments
&Self- Router reference.&str- Destination route path.
Sourcepub fn replace(&self, path: &str)
pub fn replace(&self, path: &str)
Replaces the current history entry with path without growing stack depth.
§Arguments
&Self- Router reference.&str- Replacement route path.