#[non_exhaustive]pub enum VarAttr {
Value,
Min,
Max,
Inc,
Entry(String),
}Expand description
The property of a <pVariable>’s node that a formula identifier reads.
GenICam Standard v2.1.1, §2.8.13 (SwissKnife, IntSwissKnife, Converter, and IntConverter): “you can access the minimum, maximum, and increment of a node by using the variable name extensions .Min, .Max, .Inc, and – for completeness – also .Value. In addition .Entry.Name is allowed which accesses the integer value of an EnumEntry described by Name.”
The standard’s own example puts the extension in the declaration —
<pVariable Name="Gain.Max">Gain</pVariable> — and a formula may also
qualify a plainly declared variable (V1.Min with only V1 declared).
Both resolve to the same thing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Value
The node’s value — what a plain identifier reads.
Min
The node’s minimum (<pMin> or <Min>).
Max
The node’s maximum (<pMax> or <Max>).
Inc
The node’s increment (<Inc>, 1 when undeclared).
Entry(String)
The integer value of the enumeration entry with this Name.
Implementations§
Source§impl VarAttr
impl VarAttr
Sourcepub fn parse(extension: &str) -> Option<Self>
pub fn parse(extension: &str) -> Option<Self>
Parse the extension after a variable name’s first .: Value, Min,
Max, Inc or Entry.<EntryName>.
The keyword is matched case-insensitively, since formula variables are
conventionally upper case; the entry name is matched exactly. Returns
None for anything else.