pub struct SyncGuard<'a, T: Send>(/* private fields */);
๐Deprecated since 0.9.1: This module has been deprecated in favor of the dedicated
deadpool-sync
utility crate.Expand description
This guard is returned when calling SyncWrapper::lock
or
SyncWrapper::try_lock
. This is basicly just a wrapper around
a MutexGuard
but hides some implementation details.
Important: Any blocking operation using this object
should be executed on a separate thread (e.g. via spawn_blocking
).
Trait Implementationsยง
Auto Trait Implementationsยง
impl<'a, T> Freeze for SyncGuard<'a, T>
impl<'a, T> RefUnwindSafe for SyncGuard<'a, T>
impl<'a, T> !Send for SyncGuard<'a, T>
impl<'a, T> Sync for SyncGuard<'a, T>where
T: Sync,
impl<'a, T> Unpin for SyncGuard<'a, T>
impl<'a, T> UnwindSafe for SyncGuard<'a, 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