pub struct CellGuard {
pub freeze: bool,
pub thread_id: ThreadId,
}Expand description
A guard structure that tracks the ownership state of an iCell
This is used internally by iCell to enforce thread confinement.
§Fields
freeze: Indicates if the cell is locked (ownership taken)thread_id: The thread that currently owns the cell
§Safety
The guard is protected by a Mutex to ensure thread-safe access.
Fields§
§freeze: bool§thread_id: ThreadIdAuto Trait Implementations§
impl Freeze for CellGuard
impl RefUnwindSafe for CellGuard
impl Send for CellGuard
impl Sync for CellGuard
impl Unpin for CellGuard
impl UnsafeUnpin for CellGuard
impl UnwindSafe for CellGuard
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