Struct embedded_threadsafe::safecells::shared::SharedCell   
source · pub struct SharedCell<T> { /* private fields */ }Expand description
A cell that can be safely be shared across thread boundaries and interrupt contexts
Implementations§
sourcepub fn scope<F, FR>(&self, scope: F) -> FRwhere
    F: FnOnce(&mut T) -> FR,
 
pub fn scope<F, FR>(&self, scope: F) -> FRwhere F: FnOnce(&mut T) -> FR,
Provides scoped access to the underlying value
sourcepub unsafe fn raw<F, FR>(&self, scope: F) -> FRwhere
    F: FnOnce(&mut T) -> FR,
 
pub unsafe fn raw<F, FR>(&self, scope: F) -> FRwhere F: FnOnce(&mut T) -> FR,
Provides an unsafe raw scoped access to the underlying value
Safety
This function provides unchecked, mutable access to the underlying value, so incorrect use of this function may lead to race conditions or undefined behavior.
sourcepub fn lazy_scope<F, FR>(&self, scope: F) -> FRwhere
    F: FnOnce(&mut T) -> FR,
 
pub fn lazy_scope<F, FR>(&self, scope: F) -> FRwhere F: FnOnce(&mut T) -> FR,
Provides scoped access to the underlying lazy cell
Panic
This function will panic if called from another thread or interrupt context