FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ActivatorUtilities

    struct · ferroui-dependency-injection · v0.5.0

    struct ActivatorUtilities
    

    Creates unregistered instances from the same factories as registrations. Such instances belong to the caller, not to a provider's disposal list. Explicit constructor arguments can be captured by the factory; Rust checks their types and the selected constructor.

    View source

    Members

    create_factory

    fn create_factory<S: ?Sized + 'static>(factory: ObjectFactory<S>) -> ObjectFactory<S>
    

    Source

    create_instance

    fn create_instance<S: ?Sized + 'static>(provider: &dyn IServiceProvider, factory: &ObjectFactory<S>) -> ServiceResult<Rc<S>>
    

    Source

    create_keyed_instance

    fn create_keyed_instance<S: ?Sized + 'static>(provider: &dyn IServiceProvider, key: Option<&ServiceKey>, factory: &ObjectFactory<S>) -> ServiceResult<Rc<S>>
    

    Source

    get_service_or_create_instance

    fn get_service_or_create_instance<S: ?Sized + 'static>(provider: &dyn IServiceProvider, factory: &ObjectFactory<S>) -> ServiceResult<Rc<S>>
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any

    Availability

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