pub enum SubnetError {
LevelOutOfRange {
got: u8,
},
LevelValueReserved,
TooManyLevels {
got: usize,
max: u8,
},
ParseFailed {
input: String,
reason: String,
},
}Expand description
Validation error returned by the fallible subnet constructors.
Variants§
LevelOutOfRange
Hierarchy level is outside [0, 3].
Returned by super::SubnetPolicy::try_add_rule.
LevelValueReserved
level_value == 0 is reserved for “unmatched / no
restriction at this level” and must not appear as an
explicit mapping.
Returned by super::SubnetRule::try_map.
TooManyLevels
More hierarchy levels were supplied than the encoding
supports (MAX_DEPTH = 4).
Returned by super::SubnetId::try_new.
ParseFailed
String form did not parse as a super::SubnetId.
Returned by SubnetId::from_str. Carries the original
input and a short reason so the operator sees what
rejected the value.
Trait Implementations§
Source§impl Clone for SubnetError
impl Clone for SubnetError
Source§fn clone(&self) -> SubnetError
fn clone(&self) -> SubnetError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SubnetError
impl Debug for SubnetError
Source§impl Display for SubnetError
impl Display for SubnetError
impl Eq for SubnetError
Source§impl Error for SubnetError
impl Error for SubnetError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for SubnetError
impl PartialEq for SubnetError
impl StructuralPartialEq for SubnetError
Auto Trait Implementations§
impl Freeze for SubnetError
impl RefUnwindSafe for SubnetError
impl Send for SubnetError
impl Sync for SubnetError
impl Unpin for SubnetError
impl UnsafeUnpin for SubnetError
impl UnwindSafe for SubnetError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.