pub enum RouteDistinguisherParseError {
MissingColon,
InvalidAdministrator(String),
InvalidAssignedNumber(String),
AssignedNumberOutOfRange {
value: u64,
max: u64,
},
}Expand description
Errors returned by RouteDistinguisher::from_str when a textual RD
fails to parse against the RFC 4364 §4.2 encodings.
Variants§
MissingColon
Input did not contain exactly one ':' separating administrator and
assigned-number fields.
InvalidAdministrator(String)
The administrator field could not be parsed as either an ASN
(u32) or an IPv4 address.
InvalidAssignedNumber(String)
The assigned-number field could not be parsed as a non-negative integer in the range required for the inferred RD type.
AssignedNumberOutOfRange
The assigned-number value exceeded the per-RD-type maximum
(u32::MAX for type 0, u16::MAX for types 1 and 2).
Trait Implementations§
Source§impl Clone for RouteDistinguisherParseError
impl Clone for RouteDistinguisherParseError
Source§fn clone(&self) -> RouteDistinguisherParseError
fn clone(&self) -> RouteDistinguisherParseError
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 RouteDistinguisherParseError
impl Debug for RouteDistinguisherParseError
impl Eq for RouteDistinguisherParseError
Source§impl Error for RouteDistinguisherParseError
impl Error for RouteDistinguisherParseError
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 RouteDistinguisherParseError
impl PartialEq for RouteDistinguisherParseError
Source§fn eq(&self, other: &RouteDistinguisherParseError) -> bool
fn eq(&self, other: &RouteDistinguisherParseError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RouteDistinguisherParseError
Auto Trait Implementations§
impl Freeze for RouteDistinguisherParseError
impl RefUnwindSafe for RouteDistinguisherParseError
impl Send for RouteDistinguisherParseError
impl Sync for RouteDistinguisherParseError
impl Unpin for RouteDistinguisherParseError
impl UnsafeUnpin for RouteDistinguisherParseError
impl UnwindSafe for RouteDistinguisherParseError
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