pub struct PluginMutex<T> { /* private fields */ }Expand description
See super::SharedPlugin for the per-platform lock choice.
Implementations§
Source§impl<T> PluginMutex<T>
impl<T> PluginMutex<T>
pub fn new(value: T) -> Self
Sourcepub fn lock(&self) -> PluginGuard<'_, T>
pub fn lock(&self) -> PluginGuard<'_, T>
Block until the lock is held. A panicking previous holder unlocked on unwind (guard drop); there is no poison state.
Sourcepub fn try_lock(&self) -> Option<PluginGuard<'_, T>>
pub fn try_lock(&self) -> Option<PluginGuard<'_, T>>
None when the lock is held elsewhere.
Trait Implementations§
Source§impl<T> Drop for PluginMutex<T>
impl<T> Drop for PluginMutex<T>
impl<T: Send> Send for PluginMutex<T>
impl<T: Send> Sync for PluginMutex<T>
Auto Trait Implementations§
impl<T> !Freeze for PluginMutex<T>
impl<T> !RefUnwindSafe for PluginMutex<T>
impl<T> Unpin for PluginMutex<T>where
T: Unpin,
impl<T> UnsafeUnpin for PluginMutex<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for PluginMutex<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