FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    RegisterViewForExt

    trait · ferroui-reactiveui · v0.5.0

    trait RegisterViewForExt
    

    Registers the views of a view model type in a resolver.

    View source

    Members

    register_view_for

    fn register_view_for<VM: 'static>(self: &Self, factory: impl Fn() -> Rc<dyn IViewForOf<VM>> + 'static, contract: Option<&str>)
    

    Registers factory as dyn IViewForOf<VM> under contract (Register<IViewFor<TViewModel>>(Func<...>, string?)), and records the view model type VM, so that resolve_view_unsafe of a DefaultViewLocator asks for it when a view model of that type is held as dyn Any.

    Source

    Trait implementations

    Availability

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