Skip to main content

FeatureState

Struct FeatureState 

Source
#[non_exhaustive]
pub struct FeatureState { pub kind: &'static str, pub value: FeatureValue, pub access: Option<AccessMode>, pub is_implemented: bool, pub is_available: bool, pub range: Option<ValueRange>, pub enum_entries: Option<Vec<String>>, pub unit: Option<String>, pub polling_time: Option<Duration>, pub caching: CachingMode, }
Expand description

The live state of one feature, read from the device in a single call.

See NodeMap::feature_state.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§kind: &'static str

GenICam node type, as Node::kind_name spells it.

§value: FeatureValue

The current value, or FeatureValue::None for a feature that has none to read.

§access: Option<AccessMode>

What the feature permits now: the declared mode along its <pValue> chain, made RO by a lock or by being unavailable.

None means neither reading nor writing is possible, or the node has no access mode at all, as a category does.

§is_implemented: bool

pIsImplemented: whether the device has this feature at all.

§is_available: bool

pIsAvailable and selector gating: whether the feature can be used in the device’s current state.

§range: Option<ValueRange>

Current bounds of an Integer, Float or converter feature; None when either bound is unknown — not declared, or declared through a <pMin> or <pMax> that could not be read. A converter’s are its <pValue>’s mapped through <FormulaFrom> and <Slope>.

§enum_entries: Option<Vec<String>>

The entries an Enumeration accepts now, after their own pIsImplemented/pIsAvailable.

§unit: Option<String>

Engineering unit, such as "us".

§polling_time: Option<Duration>

How long a viewer may show this value before reading it again: the <PollingTime> of the feature or of a register its value is read through (NodeMap::polling_time). None when nothing polls it.

§caching: CachingMode

Whether, and how, its value may be answered from a cache (NodeMap::caching_mode). A NoCache feature without a polling time changes on the device with nothing to say when.

Trait Implementations§

Source§

impl Clone for FeatureState

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FeatureState

Source§

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

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

impl PartialEq for FeatureState

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FeatureState

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more