pub trait Watch<V> {
// Required methods
fn new(value: &V, node: &Node, name: impl Into<StringReference>) -> Self;
fn watch(&mut self, value: &V);
}
Expand description
Used for exporting an [Inspectable
]Inspectable’s wrapped value .
Required Methods§
Sourcefn new(value: &V, node: &Node, name: impl Into<StringReference>) -> Self
fn new(value: &V, node: &Node, name: impl Into<StringReference>) -> Self
Used by Inspectable::new()
to create a Watch
er 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
Watch
er 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.