pub struct Container<Key, SvcBase: ?Sized> {
// some fields omitted
}
Methods
impl<Key, SvcBase: ?Sized> Container<Key, SvcBase> where Key: Key, SvcBase: Any
[src]
fn services(&self) -> &BTreeMap<Key, SharedMutex<Box<SvcBase>>>
fn get_service(&self, key: &Key) -> Option<&SharedMutex<Box<SvcBase>>>
fn read_service_base<'a>(&'a self, key: &'a Key) -> Result<SharedMutexReadGuard<Box<SvcBase>>, Error<'a, Key>>
fn write_service_base<'a>(&'a self, key: &'a Key) -> Result<SharedMutexWriteGuard<Box<SvcBase>>, Error<'a, Key>>
fn read_service<'a, Svc>(&'a self, key: &'a Key) -> Result<ReadGuard<Svc, SvcBase>, Error<'a, Key>> where Svc: Any, SvcBase: Downcast<Svc>
fn write_service<'a, Svc>(&'a self, key: &'a Key) -> Result<WriteGuard<Svc, SvcBase>, Error<'a, Key>> where Svc: Any, SvcBase: Downcast<Svc>
fn read<'a, Svc>(&'a self) -> Result<ReadGuard<Svc, SvcBase>, Error<'a, Key>> where Svc: Service<Key=Key>, SvcBase: Downcast<Svc>
fn write<'a, Svc>(&'a self) -> Result<WriteGuard<Svc, SvcBase>, Error<'a, Key>> where Svc: Service<Key=Key>, SvcBase: Downcast<Svc>
fn try_read_service_base<'a>(&'a self, key: &'a Key) -> Result<SharedMutexReadGuard<Box<SvcBase>>, Error<'a, Key>>
fn try_write_service_base<'a>(&'a self, key: &'a Key) -> Result<SharedMutexWriteGuard<Box<SvcBase>>, Error<'a, Key>>
fn try_read_service<'a, Svc>(&'a self, key: &'a Key) -> Result<ReadGuard<Svc, SvcBase>, Error<'a, Key>> where Svc: Any, SvcBase: Downcast<Svc>
fn try_write_service<'a, Svc>(&'a self, key: &'a Key) -> Result<WriteGuard<Svc, SvcBase>, Error<'a, Key>> where Svc: Any, SvcBase: Downcast<Svc>
fn try_read<'a, Svc>(&'a self) -> Result<ReadGuard<Svc, SvcBase>, Error<'a, Key>> where Svc: Service<Key=Key>, SvcBase: Downcast<Svc>
fn try_write<'a, Svc>(&'a self) -> Result<WriteGuard<Svc, SvcBase>, Error<'a, Key>> where Svc: Service<Key=Key>, SvcBase: Downcast<Svc>
fn resolve<'a, M>(&'a self) -> Result<M::Ret, Error<Key>> where M: Method<'a, Key, SvcBase>
Trait Implementations
Returns the "default value" for a type. Read more