FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ViewLocatorMixins

    trait · ferroui-reactiveui · v0.5.0

    trait ViewLocatorMixins
    

    The generic resolutions of a view locator (ViewLocatorMixins), implemented for dyn IViewLocator and every locator.

    Deviation (DEVIATIONS.md, ReactiveUI): upstream's overloads that supply the default contract are the same methods with None; the untyped ones (ResolveView(object?), ResolveViewUnsafe(object?)) are IViewLocator::resolve_view and IViewLocator::resolve_view_unsafe with None. The null checks of the locator have no counterpart.

    View source

    Members

    resolve_view_of

    fn resolve_view_of<VM: 'static>(self: &Self, view_model: &Rc<VM>, contract: Option<&str>) -> Option<Rc<dyn IViewFor>>
    

    Resolves the view of view_model through its compile-time type VM (ResolveView<TViewModel>(TViewModel, string?)); the view's view model is set.

    Source

    resolve_view_for

    fn resolve_view_for<VM: 'static>(self: &Self, contract: Option<&str>) -> Option<Rc<dyn IViewForOf<VM>>>
    

    Resolves a view of the type VM without a view model (ResolveView<TViewModel>(string?)): a DefaultViewLocator asks its mappings, then the service locator; any other locator has no lookup by type, so the service locator is asked for dyn IViewForOf<VM> directly. The view's view model is left unset.

    Source

    Trait implementations

    Availability

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