pub enum ObjectIdentifierConversionError {
TooLong {
max: usize,
obtained: usize,
},
ValueRange {
index: usize,
},
TooShort {
length: usize,
},
InvalidSubIdString {
index: usize,
},
}
Expand description
An error that can occur when converting from a slice of 32-bit unsigned integers into an
ObjectIdentifier
.
Variants§
TooLong
The slice is too long.
max
contains the maximum number of sub-identifiers; obtained
the number of
sub-identifiers in the slice. The maximum number of sub-identifiers in an SNMP object
identifier can be read from MAX_SUB_IDENTIFIER_COUNT
.
ValueRange
The value of one of the entries is out of range.
index
contains the index of the out-of-range value. The range of sub-identifiers in an
SNMP object identifier is equal to the range of u32
.
TooShort
The object identifier is used in a context where absolute object identifiers are required
and it has fewer than the required number of sub-identifiers. The minimum number of
sub-identifiers in an absolute object identifier can be read from
ABS_MIN_SUB_IDENTIFIER_COUNT
.
InvalidSubIdString
The sub-identifier at the given index is invalid.
Trait Implementations§
source§impl Clone for ObjectIdentifierConversionError
impl Clone for ObjectIdentifierConversionError
source§fn clone(&self) -> ObjectIdentifierConversionError
fn clone(&self) -> ObjectIdentifierConversionError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Error for ObjectIdentifierConversionError
impl Error for ObjectIdentifierConversionError
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
source§impl PartialEq for ObjectIdentifierConversionError
impl PartialEq for ObjectIdentifierConversionError
source§fn eq(&self, other: &ObjectIdentifierConversionError) -> bool
fn eq(&self, other: &ObjectIdentifierConversionError) -> bool
self
and other
values to be equal, and is used
by ==
.