pub struct IniMutex<T> { /* private fields */ }Implementations§
Source§impl<T> IniMutex<T>
impl<T> IniMutex<T>
pub const fn none() -> IniMutex<T>
pub const fn new(init: T) -> IniMutex<T>
Sourcepub fn lock(&self) -> Result<IniMutexGuard<'_, T>, i8>
pub fn lock(&self) -> Result<IniMutexGuard<'_, T>, i8>
Attempts to get a lock, returning immediately if locked or uninitialized
pub fn spin(&self) -> IniMutexGuard<'_, T>
Sourcepub fn evict(lock: IniMutexGuard<'_, T>)
pub fn evict(lock: IniMutexGuard<'_, T>)
drop the instance and reset the mutex to uninitialized
Source§impl<T: Default> IniMutex<T>
impl<T: Default> IniMutex<T>
pub fn lock_default(&self) -> Result<IniMutexGuard<'_, T>, i8>
pub fn spin_default(&self) -> IniMutexGuard<'_, T>
Trait Implementations§
impl<T: Send> Send for IniMutex<T>
impl<T: Send> Sync for IniMutex<T>
Auto Trait Implementations§
impl<T> !Freeze for IniMutex<T>
impl<T> !RefUnwindSafe for IniMutex<T>
impl<T> Unpin for IniMutex<T>where
T: Unpin,
impl<T> UnwindSafe for IniMutex<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