fuchsia_inspect_contrib::inspectable

Trait 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§

Source

fn new(value: &V, node: &Node, name: impl Into<StringReference>) -> Self

Used by Inspectable::new() to create a Watcher that exports via Inspect the Inspectable’s wrapped value.

Source

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.

Implementors§