#[non_exhaustive]pub enum BundledSchemaError {
Decode(String),
TooLarge {
actual: usize,
limit: usize,
},
TruncatedHeader {
actual: usize,
required: usize,
},
BadMagic,
UnsupportedVersion(u16),
TrailingBytes(usize),
}Expand description
Failure decoding a compiled schema artifact.
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 not a valid encoding of the declared format version.
TooLarge
The input exceeds the decoder’s resource budget.
TruncatedHeader
The input ends inside the header.
BadMagic
The input does not start with the artifact magic.
UnsupportedVersion(u16)
The header names a format version this build cannot read.
TrailingBytes(usize)
Bytes follow the decoded payload.
Trait Implementations§
Source§impl Clone for BundledSchemaError
impl Clone for BundledSchemaError
Source§impl Debug for BundledSchemaError
impl Debug for BundledSchemaError
Source§impl Display for BundledSchemaError
impl Display for BundledSchemaError
impl Eq for BundledSchemaError
Source§impl Error for BundledSchemaError
impl Error for BundledSchemaError
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 PartialEq for BundledSchemaError
impl PartialEq for BundledSchemaError
impl StructuralPartialEq for BundledSchemaError
Auto Trait Implementations§
impl Freeze for BundledSchemaError
impl RefUnwindSafe for BundledSchemaError
impl Send for BundledSchemaError
impl Sync for BundledSchemaError
impl Unpin for BundledSchemaError
impl UnsafeUnpin for BundledSchemaError
impl UnwindSafe for BundledSchemaError
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