pub struct MutexData<T, OPT = DefaultLockPolicy> { /* private fields */ }
Expand description
User-data wrapper encapsulating a Arc<Mutex<T>>
.
The underlying Mutex
may change in the future. The current implementation is
parking_lot
.
Trait Implementations§
Source§impl<T, OPT> UserData for MutexData<T, OPT>
impl<T, OPT> UserData for MutexData<T, OPT>
type Target = T
Source§fn new(val: Self::Target) -> Self
fn new(val: Self::Target) -> Self
Creates a new owned wrapper from a
NativeClass
instance. Read moreSource§fn into_user_data(self) -> *const c_void
fn into_user_data(self) -> *const c_void
Takes a native instance and returns an opaque pointer that can be used to recover it. Read more
Auto Trait Implementations§
impl<T, OPT> Freeze for MutexData<T, OPT>
impl<T, OPT = DefaultLockPolicy> !RefUnwindSafe for MutexData<T, OPT>
impl<T, OPT> Send for MutexData<T, OPT>
impl<T, OPT> Sync for MutexData<T, OPT>
impl<T, OPT> Unpin for MutexData<T, OPT>where
OPT: Unpin,
impl<T, OPT = DefaultLockPolicy> !UnwindSafe for MutexData<T, OPT>
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