#[non_exhaustive]pub enum HandleDecodeError {
Truncated {
needed: usize,
at: usize,
have: usize,
},
TrailingBytes {
pos: usize,
len: usize,
},
BadWireVersion {
got: u8,
},
BadV1Version {
got: u8,
},
BadBackendTag {
got: u8,
},
InvalidUtf8 {
field: &'static str,
},
ParseField {
field: &'static str,
detail: String,
},
}Expand description
Typed decode-failure classification. Mapped to
EngineError::Validation { kind: Corruption, .. } at the backend
boundary via the From impl.
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
Buffer shorter than required by the current read position.
TrailingBytes
Trailing bytes after the last expected field.
BadWireVersion
v2 wire-version byte did not match a supported version.
BadV1Version
v1-path version byte did not match the expected tag.
BadBackendTag
v2 backend-tag byte did not map to a known BackendTag.
InvalidUtf8
A length-prefixed string had invalid UTF-8.
ParseField
A parsed id/field failed its own validation (e.g. ExecutionId::parse).
Trait Implementations§
Source§impl Clone for HandleDecodeError
impl Clone for HandleDecodeError
Source§fn clone(&self) -> HandleDecodeError
fn clone(&self) -> HandleDecodeError
Returns a duplicate of the value. Read more
1.0.0 · 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 HandleDecodeError
impl Debug for HandleDecodeError
Source§impl Display for HandleDecodeError
impl Display for HandleDecodeError
Source§impl Error for HandleDecodeError
impl Error for HandleDecodeError
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 From<HandleDecodeError> for EngineError
impl From<HandleDecodeError> for EngineError
Source§fn from(err: HandleDecodeError) -> Self
fn from(err: HandleDecodeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for HandleDecodeError
impl PartialEq for HandleDecodeError
impl Eq for HandleDecodeError
impl StructuralPartialEq for HandleDecodeError
Auto Trait Implementations§
impl Freeze for HandleDecodeError
impl RefUnwindSafe for HandleDecodeError
impl Send for HandleDecodeError
impl Sync for HandleDecodeError
impl Unpin for HandleDecodeError
impl UnsafeUnpin for HandleDecodeError
impl UnwindSafe for HandleDecodeError
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