service_location
module · ferroui-splat · v0.5.0
module service_location
Service location (Splat.Core/ServiceLocation and Splat/ServiceLocation): the interfaces of
a dependency resolver, the three resolvers of Splat, the locator that holds the current one
(AppLocator, Locator) and the mixins over them.
A service is keyed by the type of the service, S: ?Sized + 'static, which may be a trait
object, and an optional contract; a registration is a factory that returns Option<Rc<S>>. The
interfaces are object safe, so that a resolver is held as Rc<dyn IDependencyResolver>: their
methods take the type as a ServiceType and the service type-erased (ErasedService). The
generic API callers use (register::<S>, get_service::<S>, ...) is in the extension traits
ReadonlyDependencyResolverExt and MutableDependencyResolverExt, implemented for every
resolver.
Contents
AppLocator— structIDependencyResolver— traitIMutableDependencyResolver— traitIReadonlyDependencyResolver— traitMutableDependencyResolverExt— traitReadonlyDependencyResolverExt— traitDependencyResolverMixins— traitGlobalGenericFirstDependencyResolver— structInstanceGenericFirstDependencyResolver— structLocator— structModernDependencyResolver— structResolverMixins— traitinitialize_splat— functionServiceLocationInitializationExt— traiterase_service— functionunerase_service— functionErasedService— type aliasLazyDisposal— type aliasRegistrationCallback— type aliasServiceFactory— type aliasServiceType— struct
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.