pub struct Toggle { /* private fields */ }Expand description
A reactive boolean toggle.
Constructed via Toggle::new() (Lombok New).
The initial value is the default (false); use
set_true / set_false / toggle / set to
change it. The current value is exposed as a
Signal<bool> accessed through get_value(). Any
html! body that reads toggle.get_value().get()
inside its render closure re-renders when the value
changes.
Toggle::default() produces the same value as
Toggle::new().
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Toggle
impl RefUnwindSafe for Toggle
impl Send for Toggle
impl Sync for Toggle
impl Unpin for Toggle
impl UnsafeUnpin for Toggle
impl UnwindSafe for Toggle
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