pub enum DecodeError {
    NotEnoughBytes,
    InvalidFrameType(u8),
    SecurityEnabled,
    InvalidAddressMode(u8),
    InvalidFrameVersion(u8),
    InvalidSecurityLevel(u8),
    InvalidKeyIdentifierMode(u8),
    MissingSecurityCtx,
    AuxSecHeaderAbsent,
    InvalidValue,
}
Expand description

Signals an error that occured while decoding bytes

Variants

NotEnoughBytes

Buffer does not contain enough bytes

InvalidFrameType(u8)

The frame type is invalid

SecurityEnabled

Security is enabled on the frame, and try_read is called. Frame::try_read_and_unsecure should be called instead.

InvalidAddressMode(u8)

The frame’s address mode is invalid

InvalidFrameVersion(u8)

The frame’s version is invalid or not supported

InvalidSecurityLevel(u8)

The auxiliary security header’s security level is invalid

InvalidKeyIdentifierMode(u8)

The auxiliary security header’s key identifier mode is invalid

MissingSecurityCtx

Security is enabled, but no Securty Context is provided

AuxSecHeaderAbsent

Security is enabled, but no Auxiliary Security Header is present

InvalidValue

The data stream contains an invalid value

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.