FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    RegistrarExt

    trait · ferroui-reactiveui · v0.5.0

    trait RegistrarExt: IRegistrar
    

    The generic methods of IRegistrar (IRegistrar's RegisterConstant<TService>, RegisterLazySingleton<TService> and Register<TService>). The service may be a trait object (registrar.register_constant::<dyn IViewLocator>(..)).

    View source

    Members

    register_constant

    fn register_constant<S: ?Sized + 'static>(self: &Self, factory: impl FnOnce() -> Rc<S> + 'static)
    

    Registers the value that factory creates, once, as a constant (RegisterConstant<TService>(Func<TService>)).

    Source

    register_constant_with_contract

    fn register_constant_with_contract<S: ?Sized + 'static>(self: &Self, factory: impl FnOnce() -> Rc<S> + 'static, contract: Option<&str>)
    

    Registers the value that factory creates, once, as a constant under contract (RegisterConstant<TService>(Func<TService>, string?)).

    Source

    register_lazy_singleton

    fn register_lazy_singleton<S: ?Sized + 'static>(self: &Self, factory: impl Fn() -> Rc<S> + 'static)
    

    Registers factory as a lazy singleton (RegisterLazySingleton<TService>(Func<TService>)).

    Source

    register_lazy_singleton_with_contract

    fn register_lazy_singleton_with_contract<S: ?Sized + 'static>(self: &Self, factory: impl Fn() -> Rc<S> + 'static, contract: Option<&str>)
    

    Registers factory as a lazy singleton under contract (RegisterLazySingleton<TService>(Func<TService>, string?)).

    Source

    register

    fn register<S: ?Sized + 'static>(self: &Self, factory: impl Fn() -> Rc<S> + 'static)
    

    Registers factory, which creates a value at each resolution (Register<TService>(Func<TService>)).

    Source

    register_with_contract

    fn register_with_contract<S: ?Sized + 'static>(self: &Self, factory: impl Fn() -> Rc<S> + 'static, contract: Option<&str>)
    

    Registers factory under contract (Register<TService>(Func<TService>, string?)).

    Source

    Trait implementations

    Availability

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