#[non_exhaustive]pub enum FrameHeaderError {
TooShort(usize),
BadMagic {
got: u16,
},
UnsupportedVersion(u8),
MetadataTooLarge(usize),
TruncatedMetadata,
InvalidMetadata(String),
}Expand description
A malformed or unrepresentable image envelope.
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.
TooShort(usize)
The fixed prefix is incomplete.
BadMagic
The image magic is wrong.
UnsupportedVersion(u8)
The sender uses a different envelope version.
MetadataTooLarge(usize)
Metadata exceeds the packet’s bounded allocation limit.
TruncatedMetadata
The declared metadata length exceeds the available bytes.
InvalidMetadata(String)
Metadata JSON or its field bounds are invalid.
Trait Implementations§
Source§impl Debug for FrameHeaderError
impl Debug for FrameHeaderError
Source§impl Display for FrameHeaderError
impl Display for FrameHeaderError
impl Eq for FrameHeaderError
Source§impl Error for FrameHeaderError
impl Error for FrameHeaderError
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 FrameHeaderError
impl PartialEq for FrameHeaderError
impl StructuralPartialEq for FrameHeaderError
Auto Trait Implementations§
impl Freeze for FrameHeaderError
impl RefUnwindSafe for FrameHeaderError
impl Send for FrameHeaderError
impl Sync for FrameHeaderError
impl Unpin for FrameHeaderError
impl UnsafeUnpin for FrameHeaderError
impl UnwindSafe for FrameHeaderError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.