#[non_exhaustive]pub enum GenApiError {
Show 17 variants
NodeNotFound(String),
Type(String),
Access(String),
Locked {
name: String,
locked_by: String,
},
Range(String),
Unavailable(String),
Io(String),
Parse(String),
Unsupported(String),
ExprParse {
name: String,
msg: String,
},
ExprEval {
name: String,
msg: String,
},
UnknownVariable {
name: String,
var: String,
},
EnumValueUnknown {
node: String,
value: i64,
},
EnumNoSuchEntry {
node: String,
entry: String,
},
BadIndirectAddress {
name: String,
addr: i64,
},
BitfieldOutOfRange {
name: String,
bit_offset: u16,
bit_length: u16,
len: usize,
},
ValueTooWide {
name: String,
value: i64,
bit_length: u16,
},
}Expand description
Error type produced by GenApi operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NodeNotFound(String)
The requested node does not exist in the nodemap.
Type(String)
The node exists but has a different type.
Access(String)
The node access mode forbids the attempted operation.
Locked
The node declares pIsLocked and the device currently reports it
locked, so the write was refused locally.
Names the locking feature, because that is the actionable part: a
caller told only “access denied” has nowhere to go, whereas
“ExposureTime is locked by ExposureTime_Lck” points at the feature
to change first. See ADR-0018 and backlog GA-06.
Fields
Range(String)
The provided value violates the limits declared by the node.
The node is currently hidden by selector state.
Io(String)
Underlying register IO failed.
Parse(String)
Node metadata or conversion failed.
Unsupported(String)
A declaration this crate has no builder for.
[viva_genapi_xml::NodeDecl] is #[non_exhaustive], so a node type
added to the XML layer no longer breaks this crate’s build. It
surfaces here instead, at nodemap construction, and lands in
crate::NodeMap::skipped where the corpus test will see it.
ExprParse
Parsing a SwissKnife expression failed.
ExprEval
Evaluating a SwissKnife expression failed at runtime.
UnknownVariable
A SwissKnife expression referenced an unknown variable.
EnumValueUnknown
Raw register value did not correspond to any enum entry.
EnumNoSuchEntry
Attempted to select an enum entry that does not exist.
BadIndirectAddress
Indirect addressing resolved to an invalid register.
BitfieldOutOfRange
Bitfield metadata exceeded the backing register width.
ValueTooWide
Provided value does not fit into the declared bitfield.
Trait Implementations§
Source§impl Debug for GenApiError
impl Debug for GenApiError
Source§impl Display for GenApiError
impl Display for GenApiError
Source§impl Error for GenApiError
impl Error for GenApiError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()