Skip to main content

NavWaker

Type Alias NavWaker 

Source
pub type NavWaker = Arc<dyn Fn() + Sync + Send>;
Expand description

The declarative router vocabulary (a go_router-subset layer), flat-re-exported from frust-widgets so app code never names that crate directly: Router resolves a location against a Route table (built via RouteBuilder) into Resolution/ResolvedPages driving a NavigatorController, with :param/query parsing (Location/PathPattern/RouteParams), per-route/top-level Redirects (loop-guarded at DEFAULT_REDIRECT_LIMIT), and an ErrorBuilder fallback for an unmatched location.

A page builder receives the location’s query merged under its path captures, so /terminal?session=abc reads its own parameter.

RouteNavigator is the seam a screen navigates through: a Send + Sync queue of NavRequest data (paths and names, never closures) that rides provide_context — the Router itself cannot, since it holds Rc page builders. RouterDeepLinks::track drains it every rebuild, so a request queued in an event handler (on any thread — the queue never panics off-thread) applies on the next frame.

shell_route is the nested-navigator binding: its children resolve onto a second NavigatorController the app owns and its own page — the chrome wrapping that inner navigator — stays retained while they do, so navigating between siblings inside the shell never rebuilds the chrome. See its docs for the keep rule and the per-verb table. A “wake the shell” callback: cheaply cloneable and callable from any thread, mirroring frust_reactive’s FrameWaker. frust-widgets is reactive-free, so the waker stays opaque here — the facade installs ReactiveRuntime::wake when it wires the router up.

Aliased Type§

pub struct NavWaker { /* private fields */ }