IMutableDependencyResolver
trait · ferroui-splat · v0.5.0
trait IMutableDependencyResolver
Registers services (IMutableDependencyResolver).
The methods are the object-safe core: callers use the generic forms of
MutableDependencyResolverExt.
Members
has_registration_erasedregister_erasedregister_constant_erasedregister_lazy_singleton_erasedunregister_current_erasedunregister_all_erasedservice_registration_callback_erased
has_registration_erased
fn has_registration_erased(self: &Self, service_type: ServiceType, contract: Option<&str>) -> bool
Whether a service is registered for service_type and contract (HasRegistration<T>).
register_erased
fn register_erased(self: &Self, factory: ServiceFactory, service_type: ServiceType, contract: Option<&str>)
Registers a factory, called for each resolution (Register<T>(Func<T?>, string?)).
register_constant_erased
fn register_constant_erased(self: &Self, value: Option<ErasedService>, disposal: Option<Rc<dyn Fn() -> ()>>, service_type: ServiceType, contract: Option<&str>)
Registers a constant (RegisterConstant<T>(T?, string?)). disposal is what disposing the
resolver does with it: upstream disposes a constant that is IDisposable.
register_lazy_singleton_erased
fn register_lazy_singleton_erased(self: &Self, factory: ServiceFactory, disposal: Option<LazyDisposal>, service_type: ServiceType, contract: Option<&str>)
Registers a singleton created by factory on its first resolution
(RegisterLazySingleton<T>(Func<T?>, string?)). disposal is what disposing the resolver
does with the value once it was created.
unregister_current_erased
fn unregister_current_erased(self: &Self, service_type: ServiceType, contract: Option<&str>)
Removes the last registration (UnregisterCurrent<T>(string?)).
unregister_all_erased
fn unregister_all_erased(self: &Self, service_type: ServiceType, contract: Option<&str>)
Removes every registration (UnregisterAll<T>(string?)).
service_registration_callback_erased
fn service_registration_callback_erased(self: &Self, service_type: ServiceType, contract: Option<&str>, callback: RegistrationCallback) -> Rc<dyn IDisposable>
Calls callback for every registration, those that exist and those to come, until the
returned disposable is disposed (ServiceRegistrationCallback<T>(string?, Action<IDisposable>)).
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.