Trait esp32_hal::prelude::Mutex[]

pub trait Mutex {
    type Data;
    fn lock<R>(&mut self, f: impl FnOnce(&mut Self::Data) -> R) -> R;
}
Expand description

Any object implementing this trait guarantees exclusive access to the data contained within the mutex for the duration of the lock.

Associated Types

Data protected by the mutex.

Required methods

Creates a critical section and grants temporary access to the protected data.

Implementations on Foreign Types

Implementors