#[non_exhaustive]pub enum InvalidHop {
Range,
TooMany,
Duplicate,
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Range
The id is zero or outside the 62-bit wire range, so it cannot identify a local
hop. Only Hop::new returns this; a chain never holds one.
TooMany
The list is already at its hop-count cap, which a real path never reaches and a loop does.
Duplicate
The id is already in the list. A chain that revisits a hop looped, which every receiver of it must reject, so it must not be built in the first place. The reserved id 0 identifies nothing and may repeat.
Trait Implementations§
Source§impl Clone for InvalidHop
impl Clone for InvalidHop
impl Copy for InvalidHop
Source§impl Debug for InvalidHop
impl Debug for InvalidHop
Source§impl Display for InvalidHop
impl Display for InvalidHop
impl Eq for InvalidHop
Source§impl Error for InvalidHop
impl Error for InvalidHop
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 From<InvalidHop> for DecodeError
impl From<InvalidHop> for DecodeError
Source§fn from(err: InvalidHop) -> Self
fn from(err: InvalidHop) -> Self
Converts to this type from the input type.
Source§impl PartialEq for InvalidHop
impl PartialEq for InvalidHop
impl StructuralPartialEq for InvalidHop
Auto Trait Implementations§
impl Freeze for InvalidHop
impl RefUnwindSafe for InvalidHop
impl Send for InvalidHop
impl Sync for InvalidHop
impl Unpin for InvalidHop
impl UnsafeUnpin for InvalidHop
impl UnwindSafe for InvalidHop
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