pub enum ProtoDecoderError {
Show 15 variants
Decode(DecodeError),
Label(ParseLabelError),
LabelMismatch {
actual: Label,
expected: Label,
},
LabelNotFound,
UnexpectedLabel,
Offload,
EncryptionDisabled,
ChecksumDisabled,
CompressionDisabled,
Encryption(EncryptionError),
NotEncrypted,
SecretKeyNotFound,
NoInstalledKeys,
Compression(CompressionError),
Checksum(ChecksumError),
}Expand description
An error that can occur during encoding.
Variants§
Decode(DecodeError)
Decoding error
Label(ParseLabelError)
Returned when failed to parse the label.
LabelMismatch
The label does not match the expected label
LabelNotFound
Required label is missing
UnexpectedLabel
unexpected double packet label header
Offload
The offload task is canceled
EncryptionDisabled
Returned when the encryption feature is disabled.
ChecksumDisabled
Returned when the checksum feature is disabled.
CompressionDisabled
Returned when the compression feature is disabled.
Encryption(EncryptionError)
Encryption error
NotEncrypted
Not encrypted
SecretKeyNotFound
No installed key
NoInstalledKeys
No installed keys could decrypt the message
Compression(CompressionError)
Compression error
Checksum(ChecksumError)
Checksum error
Trait Implementations§
Source§impl Debug for ProtoDecoderError
impl Debug for ProtoDecoderError
Source§impl Display for ProtoDecoderError
impl Display for ProtoDecoderError
Source§impl Error for ProtoDecoderError
impl Error for ProtoDecoderError
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<ChecksumError> for ProtoDecoderError
impl From<ChecksumError> for ProtoDecoderError
Source§fn from(source: ChecksumError) -> ProtoDecoderError
fn from(source: ChecksumError) -> ProtoDecoderError
Converts to this type from the input type.
Source§impl From<CompressionError> for ProtoDecoderError
impl From<CompressionError> for ProtoDecoderError
Source§fn from(source: CompressionError) -> ProtoDecoderError
fn from(source: CompressionError) -> ProtoDecoderError
Converts to this type from the input type.
Source§impl From<DecodeError> for ProtoDecoderError
impl From<DecodeError> for ProtoDecoderError
Source§fn from(source: DecodeError) -> ProtoDecoderError
fn from(source: DecodeError) -> ProtoDecoderError
Converts to this type from the input type.
Source§impl From<EncryptionError> for ProtoDecoderError
impl From<EncryptionError> for ProtoDecoderError
Source§fn from(source: EncryptionError) -> ProtoDecoderError
fn from(source: EncryptionError) -> ProtoDecoderError
Converts to this type from the input type.
Source§impl From<ParseLabelError> for ProtoDecoderError
impl From<ParseLabelError> for ProtoDecoderError
Source§fn from(source: ParseLabelError) -> ProtoDecoderError
fn from(source: ParseLabelError) -> ProtoDecoderError
Converts to this type from the input type.
Source§impl From<ProtoDecoderError> for Error
impl From<ProtoDecoderError> for Error
Source§fn from(value: ProtoDecoderError) -> Error
fn from(value: ProtoDecoderError) -> Error
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ProtoDecoderError
impl !RefUnwindSafe for ProtoDecoderError
impl Send for ProtoDecoderError
impl Sync for ProtoDecoderError
impl Unpin for ProtoDecoderError
impl !UnwindSafe for ProtoDecoderError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more