Type Alias embassy_sync::blocking_mutex::CriticalSectionMutex
source · pub type CriticalSectionMutex<T> = Mutex<CriticalSectionRawMutex, T>;Expand description
A mutex that allows borrowing data across executors and interrupts.
Safety
This mutex is safe to share between different executors and interrupts.
Aliased Type§
struct CriticalSectionMutex<T> { /* private fields */ }Implementations§
source§impl<R, T> Mutex<R, T>
impl<R, T> Mutex<R, T>
sourcepub const fn const_new(raw_mutex: R, val: T) -> Mutex<R, T>
pub const fn const_new(raw_mutex: R, val: T) -> Mutex<R, T>
Creates a new mutex based on a pre-existing raw mutex.
This allows creating a mutex in a constant context on stable Rust.
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes this mutex, returning the underlying data.
source§impl<T> Mutex<CriticalSectionRawMutex, T>
impl<T> Mutex<CriticalSectionRawMutex, T>
sourcepub fn borrow<'cs>(&'cs self, _cs: CriticalSection<'cs>) -> &'cs T
pub fn borrow<'cs>(&'cs self, _cs: CriticalSection<'cs>) -> &'cs T
Borrows the data for the duration of the critical section