Enum litep2p::error::ParseError
source · pub enum ParseError {
ProstDecodeError(DecodeError),
ProstEncodeError(EncodeError),
UnknownKeyType(i32),
InvalidPublicKey,
InvalidData,
}
Variants§
ProstDecodeError(DecodeError)
The provided probuf message cannot be decoded.
ProstEncodeError(EncodeError)
The provided protobuf message cannot be encoded.
UnknownKeyType(i32)
The protobuf message contains an unexpected key type.
This error can happen when:
- The provided key type is not recognized.
- The provided key type is recognized but not supported.
InvalidPublicKey
The public key bytes are invalid and cannot be parsed.
This error can happen when:
- The received number of bytes is not equal to the expected number of bytes (32 bytes).
- The bytes are not a valid Ed25519 public key.
- Length of the public key is not represented by 2 bytes (WebRTC specific).
InvalidData
The provided date has an invalid format.
This error is protocol specific.
Trait Implementations§
source§impl Debug for ParseError
impl Debug for ParseError
source§impl Display for ParseError
impl Display for ParseError
source§impl Error for ParseError
impl Error for ParseError
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<DecodeError> for ParseError
impl From<DecodeError> for ParseError
source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
source§impl From<EncodeError> for ParseError
impl From<EncodeError> for ParseError
source§fn from(source: EncodeError) -> Self
fn from(source: EncodeError) -> Self
Converts to this type from the input type.
source§impl From<ParseError> for Error
impl From<ParseError> for Error
source§fn from(error: ParseError) -> Self
fn from(error: ParseError) -> Self
Converts to this type from the input type.
source§impl From<ParseError> for NegotiationError
impl From<ParseError> for NegotiationError
source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
source§impl PartialEq for ParseError
impl PartialEq for ParseError
source§fn eq(&self, other: &ParseError) -> bool
fn eq(&self, other: &ParseError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ParseError
Auto Trait Implementations§
impl Freeze for ParseError
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnwindSafe for ParseError
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