pub struct ThreadModeMutex<T>where
T: ?Sized,{ /* private fields */ }
Expand description
A “mutex” that only allows borrowing from thread mode.
§Safety
This Mutex is only safe on single-core systems.
On multi-core systems, a ThreadModeMutex
is not sufficient to ensure exclusive access.
Implementations§
Source§impl<T> ThreadModeMutex<T>
impl<T> ThreadModeMutex<T>
Sourcepub const fn new(value: T) -> ThreadModeMutex<T>
pub const fn new(value: T) -> ThreadModeMutex<T>
Creates a new mutex
Source§impl<T> ThreadModeMutex<T>where
T: ?Sized,
impl<T> ThreadModeMutex<T>where
T: ?Sized,
Trait Implementations§
Source§impl<T> Drop for ThreadModeMutex<T>where
T: ?Sized,
impl<T> Drop for ThreadModeMutex<T>where
T: ?Sized,
impl<T> Send for ThreadModeMutex<T>where
T: ?Sized,
impl<T> Sync for ThreadModeMutex<T>where
T: ?Sized,
Auto Trait Implementations§
impl<T> !Freeze for ThreadModeMutex<T>
impl<T> !RefUnwindSafe for ThreadModeMutex<T>
impl<T> Unpin for ThreadModeMutex<T>
impl<T> UnwindSafe for ThreadModeMutex<T>where
T: UnwindSafe + ?Sized,
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