lock

Function lock 

Source
pub fn lock<T>(lock: &Mutex<T>) -> MutexGuard<'_, T>