FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IRoutableViewModel

    trait · ferroui-reactiveui · v0.5.0

    trait IRoutableViewModel: IReactiveObject + Any
    

    A view model that takes part in the navigation of a RoutingState (IRoutableViewModel).

    A routable view model names itself with a segment of a path, for diagnostics and breadcrumbs, and knows the screen that hosts it, so that it can navigate further. It is shared as an Rc<dyn IRoutableViewModel>; two of them are equal when they are the same object, as .NET compares references.

    The trait has Any as a supertrait, so that the stack can be searched for a view model of a type (RoutingStateMixins::find_view_model_in_stack).

    View source

    Members

    url_path_segment

    fn url_path_segment(self: &Self) -> Option<String>
    

    A token that names the view model, such as "login" or "user" (UrlPathSegment).

    Source

    host_screen

    fn host_screen(self: &Self) -> Option<Rc<dyn IScreen>>
    

    The screen that hosts the view model (HostScreen).

    Source

    Availability

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