Struct ioc::IocBuilder
[−]
[src]
pub struct IocBuilder<Key, SvcLock> { // some fields omitted }
Methods
impl<Key, SvcLock> IocBuilder<Key, SvcLock> where Key: Key
[src]
impl<Key, SvcBase: ?Sized> IocBuilder<Key, RwLock<Box<SvcBase>>> where Key: Key, SvcBase: Any
[src]
NOTE: if RwLock<T>
were to implement From<T>
, we could write a more generic impl...
keep an eye open for any changes...
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).
impl<Key, SvcBase: ?Sized> IocBuilder<Key, RefCell<Box<SvcBase>>> where Key: Key, SvcBase: Any
[src]
NOTE: if RefCell<T>
were to implement From<T>
, we could write a more generic impl...
keep an eye open for any changes...
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).