pub struct ExclusiveData<T: ?Sized> { /* private fields */ }
Expand description
Data protected with a critical region. Lightweight version of a mutex, intended for simple data structures.
Implementations§
Source§impl<T> ExclusiveData<T>
impl<T> ExclusiveData<T>
pub fn new(data: T) -> Self
pub fn lock(&self) -> Result<ExclusiveDataGuard<'_, T>, FreeRtosError>
pub fn lock_from_isr( &self, _context: &mut InterruptContext, ) -> Result<ExclusiveDataGuardIsr<'_, T>, FreeRtosError>
Trait Implementations§
impl<T: Sync + Send> Send for ExclusiveData<T>
impl<T: Sync + Send> Sync for ExclusiveData<T>
Auto Trait Implementations§
impl<T> !Freeze for ExclusiveData<T>
impl<T> !RefUnwindSafe for ExclusiveData<T>
impl<T> Unpin for ExclusiveData<T>
impl<T> UnwindSafe for ExclusiveData<T>where
T: UnwindSafe + ?Sized,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more