Type Alias InspectableLen

Source
pub type InspectableLen<V> = Inspectable<V, InspectableLenWatcher>;
Expand description

Exports via an Inspect UintProperty the len of the wrapped value V.

Aliased Type§

struct InspectableLen<V> { /* private fields */ }

Implementations

Source§

impl<V, W> Inspectable<V, W>
where W: Watch<V>,

Source

pub fn new<'a>(value: V, node: &Node, name: impl Into<Cow<'a, str>>) -> Self

Creates an Inspectable wrapping value. Exports value via Inspect.

Source

pub fn get_mut(&mut self) -> InspectableGuard<'_, V, W>

Returns a guard that DerefMuts to the wrapped value. The watcher will receive the updated value when the guard is Dropped.

Trait Implementations

Source§

impl<V, W> Borrow<V> for Inspectable<V, W>
where W: Watch<V>,

Source§

fn borrow(&self) -> &V

Immutably borrows from an owned value. Read more
Source§

impl<V, W> Debug for Inspectable<V, W>
where W: Watch<V>, V: Debug,

Source§

fn fmt(&self, __f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<V, W> Deref for Inspectable<V, W>
where W: Watch<V>,

Source§

type Target = V

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<V, W> PartialEq for Inspectable<V, W>
where W: Watch<V>, V: PartialEq,

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<V, W> Eq for Inspectable<V, W>
where W: Watch<V>, V: Eq,