Struct he_di::RegisteredType
[−]
[src]
pub struct RegisteredType { pub component: TypeId, pub as_trait: Option<TypeId>, pub builder: Box<ComponentBuilder>, pub parameters: ParameterMap, }
DI Container entry
When running the following command
container_builder.register_type::<MyImplOfTrait>().as::<Trait>();
- MyImplOfTrait
-> component
- Trait
-> as_trait
Fields
component: TypeId
as_trait: Option<TypeId>
builder: Box<ComponentBuilder>
parameters: ParameterMap
Methods
impl RegisteredType
[src]
fn as_type<T: ?Sized + 'static>(&mut self) -> &mut RegisteredType
fn with_named_parameter<S: Into<String> + Clone, V: Any>(
&mut self,
name: S,
value: V
) -> &mut RegisteredType
&mut self,
name: S,
value: V
) -> &mut RegisteredType
Add a new parameter for this Container entry
name
must match one of the struct's property name
fn with_typed_parameter<V: Any>(&mut self, value: V) -> &mut RegisteredType
Add a new parameter for this Container entry
type
must refer to a unique property's