Struct rscontainer::Shared [−][src]
Expand description
A pointer to a shared instance from the service container.
Implementations
Returns the inner smart pointer of the shared instance.
Returns true if two shared instances point to the same instance.
Only compares the pointers, not the contents of the shared instances, and is therefore always cheap.
Get access to the shared instance through a closure.
Get access to the shared instance through a closure.
pub fn access_mut<U, F>(&self, f: F) -> U where
S::Pointer: IAccessMut,
F: FnOnce(Poisoning<&mut <S::Pointer as IAccess>::Target>) -> U,
[src]
pub fn access_mut<U, F>(&self, f: F) -> U where
S::Pointer: IAccessMut,
F: FnOnce(Poisoning<&mut <S::Pointer as IAccess>::Target>) -> U,
[src]Get access to the shared instance through a closure.
pub fn try_access_mut<U, F>(&self, f: F) -> Option<U> where
S::Pointer: IAccessMut,
F: FnOnce(Poisoning<&mut <S::Pointer as IAccess>::Target>) -> U,
[src]
pub fn try_access_mut<U, F>(&self, f: F) -> Option<U> where
S::Pointer: IAccessMut,
F: FnOnce(Poisoning<&mut <S::Pointer as IAccess>::Target>) -> U,
[src]Get access to the shared instance through a closure.
Trait Implementations
Clones the pointer to the shared instance.
Only increases the reference count, so this is very cheap.
See Rc::clone
and Arc::clone
.
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<S: ?Sized> RefUnwindSafe for Shared<S> where
<S as IShared>::Pointer: RefUnwindSafe,
impl<S: ?Sized> UnwindSafe for Shared<S> where
<S as IShared>::Pointer: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more