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>(..)).
Members
register_constantregister_constant_with_contractregister_lazy_singletonregister_lazy_singleton_with_contractregisterregister_with_contract
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>)).
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?)).
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>)).
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?)).
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>)).
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?)).
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.