Struct ioc::Container
[−]
[src]
pub struct Container<Key, SvcBase: ?Sized> { // some fields omitted }
Methods
impl<Key, SvcBase: ?Sized> Container<Key, SvcBase> where Key: Key, SvcBase: Any
[src]
fn new() -> Self
fn register_service(&mut self, key: Key, svc: Box<SvcBase>) -> &mut Self
fn register<Svc>(&mut self, svc: Svc) -> &mut Self where Svc: Service<Key=Key>, Box<Svc>: Into<Box<SvcBase>>
NOTE: The Box<Svc>: Into<Box<Base>>
-clause is needed due to rusts lack of
HKT or a Coercible
-trait (to name two solutions).