Expand description
Single-threaded interior-mutability primitives.
LvCell<T> and LvRefCell<T> are thin newtypes around
core::cell::Cell / RefCell that are Sync. The name carries a
contract, not a runtime enforcement: the cell may only be mutated
from one thread at a time. In LVGL apps the global LVGL lock enforces
this; in other contexts, the caller must ensure single-threaded
access (e.g. the cell is only touched inside a benchmark’s
setup/run/teardown on one thread at a time).
Structs§
- LvCell
Cell<T>for state mutated only from a single logical thread at a time. MarkedSync— the caller is responsible for upholding the single-access invariant (e.g. via a lock like LVGL’s, or by structural guarantees in an embedded setup/run/teardown flow).- LvRef
Cell RefCell<T>variant ofLvCellfor non-Copystate.