FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    RoutableViewModelType

    struct · ferroui-xaml-interactions-reactiveui · v0.5.0

    struct RoutableViewModelType
    

    The view model type an action resolves and navigates to (the TViewModel of NavigateToAction and NavigateToAndResetAction).

    Deviation (DEVIATIONS.md, Behaviors): the classes of the object model are not generic, so the type argument of the reference is this value, made with of for a Rust type that implements IRoutableViewModel. It casts a parameter to the type (parameter as TViewModel) and resolves an instance of the type from the service locator (Locator.Current.GetService<TViewModel>()).

    View source

    Members

    of

    fn of<VM: IRoutableViewModel + 'static>() -> Self
    

    The view model type VM.

    Source

    name

    fn name(self: &Self) -> &'static str
    

    The Rust name of the type.

    Source

    cast

    fn cast(self: &Self, value: &BoxedValue) -> Option<RoutableViewModel>
    

    The value as a view model of the type (value as TViewModel): a shared view model of the type (Rc<VM>, the object itself, or a routable view model whose object is of the type). None for anything else.

    Source

    resolve

    fn resolve(self: &Self) -> Option<RoutableViewModel>
    

    An instance of the type from the service locator, or None if it cannot be created (Locator.Current.GetService<TViewModel>()).

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Clone
    • Copy
    • Debug

    Availability

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