Trait rscontainer::IShared [−][src]
pub trait IShared { type Pointer: ISharedPointer + IAccess<Target = Self::Target>; type Target; type Error; fn construct(ctn: Resolver<'_>) -> Result<Self::Pointer, Self::Error>; fn resolved(_this: &mut Self::Pointer, _ctn: Resolver<'_>) { ... } }
Expand description
A type that can be used as a shared service.
Associated Types
type Pointer: ISharedPointer + IAccess<Target = Self::Target>
[src]
type Pointer: ISharedPointer + IAccess<Target = Self::Target>
[src]The type of the smart pointer to the service. Supported by default:
Rc<Access<T>>
Rc<Cell<T>>
Rc<RefCell<T>>
Arc<Access<T>>
Arc<Mutex<T>>
Arc<RwLock<T>>
Where T
is equal to Self::Target
.
Use the Access
wrapper if the type is read-only or already
implements interior mutability.
The type that is used to access the shared instance.
This should be the type that the pointer eventually dereferences to.