Struct ioc::StageBuilder [] [src]

pub struct StageBuilder<'a, Key: 'a, SvcLock: 'a> {
    // some fields omitted
}

Methods

impl<'a, Key, SvcBase: ?Sized> StageBuilder<'a, 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<'a, Key, SvcBase: ?Sized> StageBuilder<'a, 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).