Router
struct · ferroui-view · v0.5.0
struct Router
The router of the nearest router above: its stack of paths, read
reactively and changed by navigation. A handle: Copy, cheap to clone,
and given to handlers as it is.
Members
navigate
fn navigate(self: &Self, path: &str)
Shows the view of path, and puts it on the stack (Navigate).
Nothing happens once the router was taken out.
navigate_back
fn navigate_back(self: &Self) -> bool
Goes back to the path before the current one, taking the current one
off the stack (NavigateBack); false when the stack holds one path
only, which stays.
navigate_and_reset
fn navigate_and_reset(self: &Self, path: &str)
Shows the view of path with a stack that holds path alone
(NavigateAndReset).
current
fn current(self: &Self) -> String
The current path: the last of the stack. Reading it makes the reader (a component, a memo, a property) follow it.
can_go_back
fn can_go_back(self: &Self) -> bool
Whether there is a path to go back to; reactive.
stack
fn stack(self: &Self) -> Vec<String>
The paths of the stack, the current one last (NavigationStack);
reactive.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeIntoValue<T>IntoValue<Option<T>>FromValue<T>FromValue<Option<T>>IntoProp<T, Value>AnyValueEqBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherTreeModelCloneCopyStructuralPartialEqPartialEqDebug
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.