pub enum Error {
Show 13 variants
Merge(MergeError),
Material(MaterialError),
InvalidSigningKey,
Truncated,
TrailingBytes,
UnsupportedVersion(u16),
UnknownTag {
field: &'static str,
tag: u8,
},
Limit {
field: &'static str,
actual: usize,
maximum: usize,
},
Utf8,
Invalid {
field: &'static str,
rule: Rule,
},
CodeCharacter {
offset: usize,
},
Checksum,
Allocation,
}Expand description
A typed failure, preserving the field and the failed structural requirement.
Variants§
Merge(MergeError)
Merge rejected a row change, written reference or decoded row state.
Material(MaterialError)
Crypto rejected encoded secret material.
InvalidSigningKey
Crypto rejected an invalid or weak Ed25519 signing key.
Truncated
More bytes were required to finish the object.
TrailingBytes
Bytes remained after the end of an object.
UnsupportedVersion(u16)
The object’s format version is not supported.
UnknownTag
A kind or variant tag is unknown.
Limit
A length exceeds the format’s bound.
Fields
Utf8
A string was not UTF-8.
Invalid
An object failed a structural check.
CodeCharacter
A typed code contained a character outside its uppercase base32 alphabet.
Checksum
A typed code’s checksum did not match its contents.
Allocation
Memory could not be reserved within the format’s bounds.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<FromUtf8Error> for Error
Text that isn’t UTF-8 is Utf8, wherever its first bad byte is.
impl From<FromUtf8Error> for Error
Text that isn’t UTF-8 is Utf8, wherever its first bad byte is.
Source§fn from(_: FromUtf8Error) -> Self
fn from(_: FromUtf8Error) -> Self
Source§impl From<MergeError> for Error
A merge check that failed while decoding is Merge.
impl From<MergeError> for Error
A merge check that failed while decoding is Merge.
Source§fn from(error: MergeError) -> Self
fn from(error: MergeError) -> Self
Source§impl From<TryReserveError> for Error
A failed reservation is Allocation. Its layout is not kept: the request
is within the format’s own bounds, so only the memory itself was missing.
impl From<TryReserveError> for Error
A failed reservation is Allocation. Its layout is not kept: the request
is within the format’s own bounds, so only the memory itself was missing.