pub struct StdMutexAccess<T> { /* private fields */ }Expand description
Lock access implementation for std::sync::Mutex
§When to Use
Use this when you have a direct reference to a Mutex, not wrapped in Arc. Common scenarios:
- Mutex is owned by a struct
- Single-threaded or thread-local usage
- When the Mutex lifetime is managed by other means
§Note
Since we’re working with &Mutex<T>, this requires the Mutex to be
stored somewhere with a stable address (e.g., in a struct, Box, or static).
Implementations§
Source§impl<T> StdMutexAccess<T>
impl<T> StdMutexAccess<T>
Trait Implementations§
Source§impl<T: Clone> Clone for StdMutexAccess<T>
impl<T: Clone> Clone for StdMutexAccess<T>
Source§fn clone(&self) -> StdMutexAccess<T>
fn clone(&self) -> StdMutexAccess<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T> Default for StdMutexAccess<T>
impl<T> Default for StdMutexAccess<T>
Source§impl<'a, T: 'static> LockAccess<Mutex<T>, &'a T> for StdMutexAccess<T>
impl<'a, T: 'static> LockAccess<Mutex<T>, &'a T> for StdMutexAccess<T>
Auto Trait Implementations§
impl<T> Freeze for StdMutexAccess<T>
impl<T> RefUnwindSafe for StdMutexAccess<T>where
T: RefUnwindSafe,
impl<T> Send for StdMutexAccess<T>where
T: Send,
impl<T> Sync for StdMutexAccess<T>where
T: Sync,
impl<T> Unpin for StdMutexAccess<T>where
T: Unpin,
impl<T> UnwindSafe for StdMutexAccess<T>where
T: UnwindSafe,
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