Enum litep2p::error::AddressError
source · pub enum AddressError {
InvalidProtocol,
InvalidUrl,
PeerIdMissing,
AddressNotAvailable,
InvalidPeerId(Multihash),
}
Expand description
Error type for address parsing.
Variants§
InvalidProtocol
The provided address does not correspond to the transport protocol.
For example, this can happen when the address used the UDP protocol but the handling transport only allows TCP connections.
InvalidUrl
The provided address is not a valid URL.
PeerIdMissing
The provided address does not include a peer ID.
AddressNotAvailable
No address is available for the provided peer ID.
InvalidPeerId(Multihash)
The provided address contains an invalid multihash.
Trait Implementations§
source§impl Debug for AddressError
impl Debug for AddressError
source§impl Display for AddressError
impl Display for AddressError
source§impl Error for AddressError
impl Error for AddressError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<AddressError> for DialError
impl From<AddressError> for DialError
source§fn from(source: AddressError) -> Self
fn from(source: AddressError) -> Self
Converts to this type from the input type.
source§impl From<AddressError> for Error
impl From<AddressError> for Error
source§fn from(source: AddressError) -> Self
fn from(source: AddressError) -> Self
Converts to this type from the input type.
source§impl From<Multihash<64>> for AddressError
impl From<Multihash<64>> for AddressError
source§fn from(hash: MultihashGeneric<64>) -> Self
fn from(hash: MultihashGeneric<64>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AddressError
impl RefUnwindSafe for AddressError
impl Send for AddressError
impl Sync for AddressError
impl Unpin for AddressError
impl UnwindSafe for AddressError
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