pub struct SignalCell<T>{ /* private fields */ }Expand description
A Sync wrapper for single-threaded global Signal access.
SAFETY: This type is only safe to use in single-threaded contexts
(e.g., WASM). It implements Sync to allow usage as a static
variable, but concurrent access from multiple threads would be
undefined behavior.
Implementations§
Trait Implementations§
Source§impl<T> Default for SignalCell<T>
Provides a default empty SignalCell.
impl<T> Default for SignalCell<T>
Provides a default empty SignalCell.
impl<T> Sync for SignalCell<T>
SAFETY: SignalCell is only used in single-threaded WASM contexts.
Concurrent access from multiple threads would be undefined behavior.
Auto Trait Implementations§
impl<T> !Freeze for SignalCell<T>
impl<T> !RefUnwindSafe for SignalCell<T>
impl<T> !Send for SignalCell<T>
impl<T> Unpin for SignalCell<T>
impl<T> UnsafeUnpin for SignalCell<T>
impl<T> !UnwindSafe for SignalCell<T>
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