Struct closeable_mutex::ClosedGuard
source · pub struct ClosedGuard<T: ?Sized>(/* private fields */);
Expand description
A guard that can be used to access the underlying value of a
CloseableMutex
while it is closed.
This wraps an Arc
so that you can keep the mutex closed
for an unbounded period without having to deal with a lifetime.
Implementations§
source§impl<T: ?Sized> ClosedGuard<T>
impl<T: ?Sized> ClosedGuard<T>
sourcepub fn open(self) -> Arc<CloseableMutex<T>>
pub fn open(self) -> Arc<CloseableMutex<T>>
Opens the mutex, returning the inner instance.
Trait Implementations§
source§impl<T: ?Sized> Deref for ClosedGuard<T>
impl<T: ?Sized> Deref for ClosedGuard<T>
source§impl<T: ?Sized> DerefMut for ClosedGuard<T>
impl<T: ?Sized> DerefMut for ClosedGuard<T>
Auto Trait Implementations§
impl<T> Freeze for ClosedGuard<T>where
T: ?Sized,
impl<T> !RefUnwindSafe for ClosedGuard<T>
impl<T> Send for ClosedGuard<T>
impl<T> Sync for ClosedGuard<T>
impl<T> Unpin for ClosedGuard<T>where
T: ?Sized,
impl<T> !UnwindSafe for ClosedGuard<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more