Skip to content

Glossary: Rust Beyond the Basics

guard

Also written: lock guard, MutexGuard

The value `lock()` returns on a `Mutex`. You use it like a `&mut` to reach the data inside, and dropping it releases the lock.

Where the book teaches it

Related terms

MutexDrop