pub enum SecurityError {
Show 18 variants SecurityNotEnabled, InvalidSecContext, FrameTooLong, CounterError, UnavailableKey, KeyFailure, NoSourceAddress, NoDestinationAddress, TransformationError, WriteError(Error), TagWriteError, NotImplemented, AuxSecHeaderAbsent, KeyIdentifierMismatch, UnsupportedLegacy, UnsupportedSecurity, UnavailableDevice, KeyLookupAddressTypeMismatch,
}
Expand description

Errors that can occur while performing security operations on frames

Variants

SecurityNotEnabled

Security is not enabled for this frame

InvalidSecContext

The provided security context cannot be used to secure the frame

FrameTooLong

The frame is too long after appending all security data

CounterError

The counter used for securing a frame is invalid (0xFFFFFFFF)

UnavailableKey

No key could be found for the provided context

KeyFailure

The key could not be used in an adequate manner

NoSourceAddress

The frame to be unsecured has no source address specified. The source address is necessary to calculate the nonce, in some cases

NoDestinationAddress

The frame to be secured has no destination address specified. The destination address is necessary to calculate the nonce, in some cases

TransformationError

The security (CCM*) transformation could not be completed successfully

WriteError(Error)

Something went wrong while writing the frame’s payload bytes to the buffer

TagWriteError

Something went wrong while writing a frame’s tag to the buffer

NotImplemented

When functionality that is not implemented is used

AuxSecHeaderAbsent

Security is enabled, but no auxiliary security header is present

KeyIdentifierMismatch

The type of key identifier mode specified in the security control differs from the type of key identifier present in the key_identifier field

UnsupportedLegacy

When a frame with an unsupported legacy version is passed to the unsecuring function

UnsupportedSecurity

The security level of an incomin frame is zero

UnavailableDevice

The device descriptor that belongs to an address can not be found

KeyLookupAddressTypeMismatch

The address returned by the specific implementation of KeyDescriptorLookup is not of type Address::Extended

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.

Converts to this type from the input type.

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.