pub type MappedSpinlockGuard<'a, T> = MappedMutexGuard<'a, RawSpinlock<Spin>, T>;Expand description
A RAII guard returned by SpinlockGuard::map.
§Example
use spinning_top::{
    guard::{MappedSpinlockGuard, SpinlockGuard},
    Spinlock,
};
let spinlock = Spinlock::new(Some(3));
// Begin a new scope.
{
    // Lock the spinlock to create a `SpinlockGuard`.
    let mut guard: SpinlockGuard<_> = spinlock.lock();
    // Map the internal value of `guard`. `guard` is moved.
    let mut mapped: MappedSpinlockGuard<'_, _> =
        SpinlockGuard::map(guard, |g| g.as_mut().unwrap());
    assert_eq!(*mapped, 3);
    *mapped = 5;
    assert_eq!(*mapped, 5);
} // `mapped` is dropped -> frees the spinlock again.
// The operation is reflected to the original lock.
assert_eq!(*spinlock.lock(), Some(5));Aliased Type§
pub struct MappedSpinlockGuard<'a, T> { /* private fields */ }