pub trait Watch<V> {
// Required methods
fn new<'a>(value: &V, node: &Node, name: impl Into<Cow<'a, str>>) -> Self;
fn watch(&mut self, value: &V);
}Expand description
Used for exporting an [Inspectable]Inspectable’s wrapped value .
Required Methods§
Sourcefn new<'a>(value: &V, node: &Node, name: impl Into<Cow<'a, str>>) -> Self
fn new<'a>(value: &V, node: &Node, name: impl Into<Cow<'a, str>>) -> Self
Used by Inspectable::new() to create a Watcher that exports via
Inspect the Inspectable’s wrapped value.
Sourcefn watch(&mut self, value: &V)
fn watch(&mut self, value: &V)
Called by InspectableGuard when the guard is dropped, letting the
Watcher update its state with the updated value.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.