pub enum ResponseError {
InputLimit {
limit: usize,
},
InvalidUtf8 {
offset: usize,
},
Json {
kind: JsonErrorKind,
line: usize,
column: usize,
},
MissingResponseBytes,
MissingHexLabel,
EmptyHex,
InvalidHex {
offset: usize,
},
OddHexLength,
DecodedLimit {
limit: usize,
},
Allocation(TryReserveError),
}Expand description
Response decoding failed. Formatting never includes response contents.
Variants§
InputLimit
Complete input exceeds its allowance, before any parsing.
InvalidUtf8
JSON input contains invalid UTF-8, including in ignored metadata.
Json
JSON could not be decoded as the canonical envelope.
Fields
§
kind: JsonErrorKindStructured parser category.
MissingResponseBytes
The top-level response field is absent or null.
MissingHexLabel
Labeled hex does not begin with the exact admitted label.
EmptyHex
The selected text hex format contains no digits.
InvalidHex
A byte is not a hex digit or permitted whitespace.
Fields
OddHexLength
The hex portion contains an odd number of digits.
DecodedLimit
Valid hex would exceed the decoded byte allowance.
Allocation(TryReserveError)
Storage could not be reserved for decoded bytes.
Trait Implementations§
Source§impl Debug for ResponseError
impl Debug for ResponseError
Source§impl Display for ResponseError
impl Display for ResponseError
Source§impl Error for ResponseError
impl Error for ResponseError
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 ResponseError
impl RefUnwindSafe for ResponseError
impl Send for ResponseError
impl Sync for ResponseError
impl Unpin for ResponseError
impl UnsafeUnpin for ResponseError
impl UnwindSafe for ResponseError
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