pub struct UseState<T> { /* private fields */ }Expand description
A value kept between rebuilds by BuildContext::use_state. Changing it asks for a
rebuild; reading it does not.
Cloning a UseState clones the handle: every clone reads and writes the same value,
which is what lets a handler own one.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for UseState<T>
impl<T> !Send for UseState<T>
impl<T> !Sync for UseState<T>
impl<T> !UnwindSafe for UseState<T>
impl<T> Freeze for UseState<T>
impl<T> Unpin for UseState<T>
impl<T> UnsafeUnpin for UseState<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