pub struct SpinMutex<T>where
T: ?Sized,{ /* private fields */ }
Implementations§
source§impl<T> SpinMutex<T>
impl<T> SpinMutex<T>
pub const fn new(data: T) -> SpinMutex<T>
pub fn into_inner(self) -> T
source§impl<T> SpinMutex<T>where
T: ?Sized,
impl<T> SpinMutex<T>where T: ?Sized,
pub fn lock(&self) -> SpinMutexGuard<'_, T>
pub fn is_locked(&self) -> bool
pub fn unlock(guard: SpinMutexGuard<'_, T>)
pub unsafe fn force_unlock(&self)
pub fn try_lock(&self) -> Option<SpinMutexGuard<'_, T>>
pub fn get_mut(&mut self) -> &mut T
Trait Implementations§
impl<T> ContiguousMemory for SpinMutex<T>where T: ContiguousMemory,
impl<T> Send for SpinMutex<T>where T: Send + ?Sized,
impl<T> Sync for SpinMutex<T>where T: Send + ?Sized,
Auto Trait Implementations§
impl<T> !RefUnwindSafe for SpinMutex<T>
impl<T: ?Sized> Unpin for SpinMutex<T>where T: Unpin,
impl<T: ?Sized> UnwindSafe for SpinMutex<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