FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    MutableDependencyResolverExtensions

    trait · ferroui-reactiveui · v0.5.0

    trait MutableDependencyResolverExtensions: IMutableDependencyResolver
    

    The registration of the views of view models without reflection (MutableDependencyResolverExtensions): a view type with a default constructor is registered as the dyn IViewForOf<VM> of its view model.

    As upstream's static constructor, the first call on a thread checks that ReactiveUI was initialized (RxAppBuilder::ensure_initialized), and panics if it was not.

    Deviation (DEVIATIONS.md, ReactiveUI): upstream's static constructor runs once per process; the check runs once per thread, as the state of ReactiveUI is per thread.

    View source

    Members

    register_view_for_view_model

    fn register_view_for_view_model<V: IViewForOf<VM> + Default + 'static, VM: 'static>(self: &Self) -> &Self
    

    Registers V as the view of VM, a new view at each resolution (RegisterViewForViewModel<TView, TViewModel>()); returns the resolver, to chain the calls.

    Source

    register_view_for_view_model_with_contract

    fn register_view_for_view_model_with_contract<V: IViewForOf<VM> + Default + 'static, VM: 'static>(self: &Self, contract: Option<&str>) -> &Self
    

    Registers V as the view of VM under contract, a new view at each resolution (RegisterViewForViewModel<TView, TViewModel>(string?)).

    Source

    register_singleton_view_for_view_model

    fn register_singleton_view_for_view_model<V: IViewForOf<VM> + Default + 'static, VM: 'static>(self: &Self) -> &Self
    

    Registers V as the view of VM, one view created at the first resolution (RegisterSingletonViewForViewModel<TView, TViewModel>()).

    Source

    register_singleton_view_for_view_model_with_contract

    fn register_singleton_view_for_view_model_with_contract<V: IViewForOf<VM> + Default + 'static, VM: 'static>(self: &Self, contract: Option<&str>) -> &Self
    

    Registers V as the view of VM under contract, one view created at the first resolution (RegisterSingletonViewForViewModel<TView, TViewModel>(string?)).

    Source

    Trait implementations

    Availability

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