#[non_exhaustive]pub enum ArchiveError {
Decode(String),
TooLarge {
actual: usize,
limit: usize,
},
TruncatedHeader {
actual: usize,
required: usize,
},
BadMagic,
UnsupportedVersion(u16),
TrailingBytes(usize),
Catalog(CatalogError),
MissingEdition(CatalogEdition),
}Expand description
Why a serialized catalog snapshot could not be decoded.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Decode(String)
The payload is malformed; the message names what is wrong.
TooLarge
Input exceeds the 8 MiB resource budget for a catalog artifact.
TruncatedHeader
Input is shorter than the magic plus minimum version header.
BadMagic
Input does not start with the expected 8-byte magic sequence.
UnsupportedVersion(u16)
The decoded format-version number is not the version this build reads.
TrailingBytes(usize)
Bytes remained after the payload was fully decoded.
Catalog(CatalogError)
The decoded payload failed Catalog::try_new validation.
MissingEdition(CatalogEdition)
The snapshot is well formed but holds no such edition.
Trait Implementations§
Source§impl Clone for ArchiveError
impl Clone for ArchiveError
Source§fn clone(&self) -> ArchiveError
fn clone(&self) -> ArchiveError
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 moreSource§impl Debug for ArchiveError
impl Debug for ArchiveError
Source§impl Display for ArchiveError
impl Display for ArchiveError
impl Eq for ArchiveError
Source§impl Error for ArchiveError
impl Error for ArchiveError
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<ArchiveError> for EmbeddedCatalogError
impl From<ArchiveError> for EmbeddedCatalogError
Source§fn from(source: ArchiveError) -> Self
fn from(source: ArchiveError) -> Self
Converts to this type from the input type.
Source§impl From<ArchiveError> for RuntimeCatalogError
impl From<ArchiveError> for RuntimeCatalogError
Source§fn from(source: ArchiveError) -> Self
fn from(source: ArchiveError) -> Self
Converts to this type from the input type.
Source§impl From<CatalogError> for ArchiveError
impl From<CatalogError> for ArchiveError
Source§fn from(source: CatalogError) -> Self
fn from(source: CatalogError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ArchiveError
impl PartialEq for ArchiveError
impl StructuralPartialEq for ArchiveError
Auto Trait Implementations§
impl Freeze for ArchiveError
impl RefUnwindSafe for ArchiveError
impl Send for ArchiveError
impl Sync for ArchiveError
impl Unpin for ArchiveError
impl UnsafeUnpin for ArchiveError
impl UnwindSafe for ArchiveError
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