Trait fuchsia_inspect_contrib::inspectable::Watch
source · 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
.
Object Safety§
This trait is not object safe.