Locks the spinlock and returns a guard. The returned value may be dereferenced for data access and the lock will be dropped when the guard falls out of scope. ``` let mylock = spin::Mutex::new(0); { let mut data = mylock.lock(); // The lock is now locked and the data can be accessed data += 1; // The lock is implicitly dropped } ```
(&self)
source not stored for this graph (policy: none)
no test coverage detected