Struct tokio_sync::lock::Lock [−][src]
pub struct Lock<T> { /* fields omitted */ }
Expand description
An asynchronous mutual exclusion primitive useful for protecting shared data
Each mutex has a type parameter (T
) which represents the data that it is protecting. The data
can only be accessed through the RAII guards returned from poll_lock
, which guarantees that
the data is only ever accessed when the mutex is locked.
Implementations
Trait Implementations
Auto Trait Implementations
Blanket Implementations
Mutably borrows from an owned value. Read more