Struct he_di::Container [] [src]

pub struct Container { /* fields omitted */ }

Struct containing all the registered components and associated with a specific set of parameters

Methods

impl Container
[src]

Get an instance of the component registered with the trait T Current implementation removes all information related to the component (i.e. can't be used as a builder/factory of Components)

Sample usage: rust, ignore he_di::container::Container::resolve::<MyTrait>();

Get a reference of a component registered with the trait T This component can later be resolved with any other resolve method

Sample usage: rust, ignore he_di::container::Container::resolve_ref::<MyTrait>();

Get a mutable reference of a component registered with the trait T This component can later be resolved with any other resolve method

Sample usage: rust, ignore he_di::container::Container::resolve_mut::<MyTrait>();

Add a new named parameter for an already registered Component T If T wasn't previously registered, does nothing

Add a new typed parameter for an already registered Component T If T wasn't previously registered, does nothing