FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    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.

    Source

    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.

    Source

    navigate_and_reset

    fn navigate_and_reset(self: &Self, path: &str)
    

    Shows the view of path with a stack that holds path alone (NavigateAndReset).

    Source

    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.

    Source

    can_go_back

    fn can_go_back(self: &Self) -> bool
    

    Whether there is a path to go back to; reactive.

    Source

    stack

    fn stack(self: &Self) -> Vec<String>
    

    The paths of the stack, the current one last (NavigationStack); reactive.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.