FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ModernDependencyResolver

    struct · ferroui-splat · v0.5.0

    struct ModernDependencyResolver
    

    A resolver that keeps a list of factories per service type and contract (ModernDependencyResolver): the last registration wins for get_service, get_services returns them all in the order of registration, and a registration runs the callbacks of its key.

    The registry is copied on write: a factory or a callback that registers while the registry is read does not change what is being read.

    A missing contract and the empty contract are the same key.

    View source

    Members

    new

    fn new() -> Self
    

    An empty resolver.

    Source

    duplicate

    fn duplicate(self: &Self) -> Self
    

    A new resolver with the registrations of this one, without its callbacks (Duplicate). The lazy singletons are shared with this resolver.

    Source

    Trait implementations

    Availability

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