struct QUEUE_FRAMES {
__private_field: (),
}Fields§
§__private_field: ()Methods from Deref<Target = Mutex<Vec<FrameTracker>>>§
Sourcepub fn lock(&self) -> MutexGuard<'_, T>
pub fn lock(&self) -> MutexGuard<'_, T>
Locks the Mutex and returns a guard that permits access to the inner data.
The returned value may be dereferenced for data access and the lock will be dropped when the guard falls out of scope.
let lock = spin::Mutex::new(0);
{
let mut data = lock.lock();
// The lock is now locked and the data can be accessed
*data += 1;
// The lock is implicitly dropped at the end of the scope
}Sourcepub fn is_locked(&self) -> bool
pub fn is_locked(&self) -> bool
Returns true if the lock is currently held.
§Safety
This function provides no synchronization guarantees and so its result should be considered ‘out of date’ the instant it is called. Do not use it for synchronization purposes. However, it may be useful as a heuristic.
Sourcepub unsafe fn force_unlock(&self)
pub unsafe fn force_unlock(&self)
Sourcepub fn try_lock(&self) -> Option<MutexGuard<'_, T>>
pub fn try_lock(&self) -> Option<MutexGuard<'_, T>>
Trait Implementations§
Source§impl Deref for QUEUE_FRAMES
impl Deref for QUEUE_FRAMES
impl LazyStatic for QUEUE_FRAMES
Auto Trait Implementations§
impl Freeze for QUEUE_FRAMES
impl RefUnwindSafe for QUEUE_FRAMES
impl Send for QUEUE_FRAMES
impl Sync for QUEUE_FRAMES
impl Unpin for QUEUE_FRAMES
impl UnwindSafe for QUEUE_FRAMES
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