pub enum KeyBlockHeaderError {
Show 17 variants
InvalidDataLength {
minimum: usize,
actual: usize,
},
NonAsciiHeader,
InvalidKeyBlockLength,
InvalidNumberOfOptionalBlocks,
InvalidHeaderLengthWithOptionalBlocks {
minimum: usize,
actual: usize,
},
InvalidVersionId(String),
InvalidKeyUsage(String),
InvalidAlgorithm(String),
InvalidModeOfUse(String),
InvalidKeyVersionNumberLength(String),
InvalidKeyVersionNumberEncoding(String),
InvalidExportability(String),
TooManyOptionalBlocks {
maximum: u8,
actual: u8,
},
InvalidReservedField(String),
ExportFailedEmptyFields,
OptionalBlock(OptBlockError),
FailedToParseOptionalBlocks(OptBlockError),
}Expand description
Errors produced while constructing, parsing, validating, or serializing a TR-31 key block header.
Variants§
InvalidDataLength
NonAsciiHeader
InvalidKeyBlockLength
InvalidNumberOfOptionalBlocks
InvalidHeaderLengthWithOptionalBlocks
InvalidVersionId(String)
InvalidKeyUsage(String)
InvalidAlgorithm(String)
InvalidModeOfUse(String)
InvalidKeyVersionNumberLength(String)
InvalidKeyVersionNumberEncoding(String)
InvalidExportability(String)
TooManyOptionalBlocks
InvalidReservedField(String)
ExportFailedEmptyFields
OptionalBlock(OptBlockError)
Error propagated directly from optional-block processing.
FailedToParseOptionalBlocks(OptBlockError)
Optional-block error specifically encountered while parsing a header.
Trait Implementations§
Source§impl Debug for KeyBlockHeaderError
impl Debug for KeyBlockHeaderError
Source§impl Display for KeyBlockHeaderError
impl Display for KeyBlockHeaderError
Source§impl Error for KeyBlockHeaderError
impl Error for KeyBlockHeaderError
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<KeyBlockHeaderError> for Tr31Error
impl From<KeyBlockHeaderError> for Tr31Error
Source§fn from(error: KeyBlockHeaderError) -> Self
fn from(error: KeyBlockHeaderError) -> Self
Converts to this type from the input type.
Source§impl<E> From<KeyBlockHeaderError> for Tr31CryptoError<E>
impl<E> From<KeyBlockHeaderError> for Tr31CryptoError<E>
Source§fn from(error: KeyBlockHeaderError) -> Self
fn from(error: KeyBlockHeaderError) -> Self
Converts to this type from the input type.
Source§impl From<OptBlockError> for KeyBlockHeaderError
impl From<OptBlockError> for KeyBlockHeaderError
Source§fn from(error: OptBlockError) -> Self
fn from(error: OptBlockError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for KeyBlockHeaderError
impl RefUnwindSafe for KeyBlockHeaderError
impl Send for KeyBlockHeaderError
impl Sync for KeyBlockHeaderError
impl Unpin for KeyBlockHeaderError
impl UnsafeUnpin for KeyBlockHeaderError
impl UnwindSafe for KeyBlockHeaderError
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