FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    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>).

    Source

    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?)).

    Source

    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.

    Source

    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.

    Source

    unregister_current_erased

    fn unregister_current_erased(self: &Self, service_type: ServiceType, contract: Option<&str>)
    

    Removes the last registration (UnregisterCurrent<T>(string?)).

    Source

    unregister_all_erased

    fn unregister_all_erased(self: &Self, service_type: ServiceType, contract: Option<&str>)
    

    Removes every registration (UnregisterAll<T>(string?)).

    Source

    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>)).

    Source

    Trait implementations

    Availability

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