#[non_exhaustive]pub enum EnvelopeError {
Truncated {
needed: usize,
got: usize,
},
BadMagic {
expected: [u8; 4],
found: [u8; 4],
},
VersionMismatch {
expected: u32,
found: u32,
},
SectionTooLarge {
len: usize,
max: usize,
},
}Expand description
Errors returned from WireReader decode operations. Variants are
non-exhaustive so additive framing variants stay backward-compatible.
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.
Truncated
Payload ended before the requested section was fully read.
Fields
BadMagic
First four bytes did not match the consumer’s expected magic.
Fields
VersionMismatch
Wire version header did not match the consumer’s expected
version. Primary signal for cache invalidation: a
VersionMismatch is the consumer’s cue to discard the cache and
recompile from source.
Fields
SectionTooLarge
A section or word-array length could not fit in the envelope’s
u32 length prefix.
Trait Implementations§
Source§impl Clone for EnvelopeError
impl Clone for EnvelopeError
Source§fn clone(&self) -> EnvelopeError
fn clone(&self) -> EnvelopeError
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 EnvelopeError
impl Debug for EnvelopeError
Source§impl Display for EnvelopeError
impl Display for EnvelopeError
Source§impl Error for EnvelopeError
impl Error for EnvelopeError
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()
Auto Trait Implementations§
impl Freeze for EnvelopeError
impl RefUnwindSafe for EnvelopeError
impl Send for EnvelopeError
impl Sync for EnvelopeError
impl Unpin for EnvelopeError
impl UnsafeUnpin for EnvelopeError
impl UnwindSafe for EnvelopeError
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