pub struct WatchBuilder { /* private fields */ }Expand description
Builder for a state watcher.
Created by Live::watch and returned to the Live chain via then.
Implementations§
Source§impl WatchBuilder
impl WatchBuilder
Sourcepub fn changed_to(self, value: Value) -> Self
pub fn changed_to(self, value: Value) -> Self
Fire when the new value equals the given value.
Sourcepub fn crossed_above(self, threshold: f64) -> Self
pub fn crossed_above(self, threshold: f64) -> Self
Fire when the value crosses above the given threshold.
Sourcepub fn crossed_below(self, threshold: f64) -> Self
pub fn crossed_below(self, threshold: f64) -> Self
Fire when the value crosses below the given threshold.
Sourcepub fn became_true(self) -> Self
pub fn became_true(self) -> Self
Fire when the value changes from non-true to true.
Sourcepub fn became_false(self) -> Self
pub fn became_false(self) -> Self
Fire when the value changes from true to non-true.
Auto Trait Implementations§
impl !Freeze for WatchBuilder
impl !RefUnwindSafe for WatchBuilder
impl Send for WatchBuilder
impl Sync for WatchBuilder
impl Unpin for WatchBuilder
impl !UnwindSafe for WatchBuilder
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