pub enum CodecError {
BodyTooLarge {
actual: usize,
maximum: usize,
},
InvalidJson(Error),
NestingTooDeep {
maximum: usize,
},
MissingField {
field: String,
},
UnknownField {
field: String,
},
InvalidField {
field: String,
reason: String,
},
NullOptionalField {
field: String,
},
InvalidBase64 {
field: String,
},
ProtocolValidation(ValidationError),
}Expand description
A malformed or locally disallowed wire representation.
Variants§
BodyTooLarge
The body exceeds its configured byte limit.
InvalidJson(Error)
JSON syntax is invalid.
NestingTooDeep
A JSON container exceeds the configured nesting depth.
MissingField
A required field is absent.
UnknownField
An undeclared field is present.
InvalidField
A field has an invalid JSON type or semantic representation.
NullOptionalField
An optional field was represented by JSON null rather than omission.
InvalidBase64
Base64 is not canonical RFC 4648 Section 4 encoding.
ProtocolValidation(ValidationError)
Logical protocol validation rejected the decoded representation.
Trait Implementations§
Source§impl Debug for CodecError
impl Debug for CodecError
Source§impl Display for CodecError
impl Display for CodecError
Source§impl Error for CodecError
impl Error for CodecError
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<CodecError> for EncodeHttpError
impl From<CodecError> for EncodeHttpError
Source§fn from(value: CodecError) -> Self
fn from(value: CodecError) -> Self
Converts to this type from the input type.
Source§impl From<ValidationError> for CodecError
impl From<ValidationError> for CodecError
Source§fn from(value: ValidationError) -> Self
fn from(value: ValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for CodecError
impl !UnwindSafe for CodecError
impl Freeze for CodecError
impl Send for CodecError
impl Sync for CodecError
impl Unpin for CodecError
impl UnsafeUnpin for CodecError
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