pub enum PayloadError {
InvalidCipherBlockLength,
InvalidTotalPayloadLength,
KeyTooLong {
max: usize,
actual: usize,
},
RandomSeedTooShort {
required: usize,
actual: usize,
},
PayloadTooShort {
minimum: usize,
actual: usize,
},
PayloadTooShortForKey {
required: usize,
actual: usize,
},
}Expand description
Errors produced while constructing or parsing a TR-31 payload.
Variants§
InvalidCipherBlockLength
The cipher block length must be greater than zero.
InvalidTotalPayloadLength
The calculated payload length is invalid.
KeyTooLong
The protected key is too large for the TR-31 16-bit key-length field.
RandomSeedTooShort
The supplied random seed does not contain enough bytes for padding.
PayloadTooShort
The payload does not contain the two-byte key-length field.
PayloadTooShortForKey
The payload does not contain as many key bytes as its length field declares.
Trait Implementations§
Source§impl Clone for PayloadError
impl Clone for PayloadError
Source§fn clone(&self) -> PayloadError
fn clone(&self) -> PayloadError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PayloadError
Source§impl Debug for PayloadError
impl Debug for PayloadError
Source§impl Display for PayloadError
impl Display for PayloadError
impl Eq for PayloadError
Source§impl Error for PayloadError
impl Error for PayloadError
1.30.0 · 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<PayloadError> for Tr31Error
impl From<PayloadError> for Tr31Error
Source§fn from(error: PayloadError) -> Self
fn from(error: PayloadError) -> Self
Converts to this type from the input type.
Source§impl<E> From<PayloadError> for Tr31CryptoError<E>
impl<E> From<PayloadError> for Tr31CryptoError<E>
Source§fn from(error: PayloadError) -> Self
fn from(error: PayloadError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PayloadError
impl PartialEq for PayloadError
impl StructuralPartialEq for PayloadError
Auto Trait Implementations§
impl Freeze for PayloadError
impl RefUnwindSafe for PayloadError
impl Send for PayloadError
impl Sync for PayloadError
impl Unpin for PayloadError
impl UnsafeUnpin for PayloadError
impl UnwindSafe for PayloadError
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