pub struct State<T> { /* private fields */ }Expand description
Owned component state. Clonable and Send (if T: Send) so it can be moved
into hook-spawned tasks; setting it marks the owning fiber dirty.
Locking recovers from poisoning: a panicking update closure cannot
permanently brick the cell.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for State<T>
impl<T> RefUnwindSafe for State<T>
impl<T> Send for State<T>
impl<T> Sync for State<T>
impl<T> Unpin for State<T>
impl<T> UnsafeUnpin for State<T>
impl<T> UnwindSafe for State<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