Enum rocket_contrib::msgpack::Error
source · pub enum Error {
InvalidMarkerRead(Error),
InvalidDataRead(Error),
TypeMismatch(Marker),
OutOfRange,
LengthMismatch(u32),
Uncategorized(String),
Syntax(String),
Utf8Error(Utf8Error),
DepthLimitExceeded,
}
Expand description
Enum representing errors that can occur while decoding MessagePack data.
Variants§
InvalidMarkerRead(Error)
The enclosed I/O error occured while trying to read a MessagePack marker.
InvalidDataRead(Error)
The enclosed I/O error occured while trying to read the encoded MessagePack data.
TypeMismatch(Marker)
A mismatch occured between the decoded and expected value types.
OutOfRange
A numeric cast failed due to an out-of-range error.
LengthMismatch(u32)
A decoded array did not have the enclosed expected length.
Uncategorized(String)
An otherwise uncategorized error occured. See the enclosed String
for
details.
Syntax(String)
A general error occured while deserializing the expected type. See the
enclosed String
for details.
Utf8Error(Utf8Error)
An encoded string could not be parsed as UTF-8.
DepthLimitExceeded
The depth limit was exceeded; not currently used.
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§impl Error for Error
impl Error for Error
source§fn custom<T>(msg: T) -> Errorwhere
T: Display,
fn custom<T>(msg: T) -> Errorwhere
T: Display,
Raised when there is general error when deserializing a type. Read more
source§fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Raised when a
Deserialize
receives a type different from what it was
expecting. Read moresource§fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Raised when a
Deserialize
receives a value of the right type but that
is wrong for some other reason. Read moresource§fn invalid_length(len: usize, exp: &dyn Expected) -> Self
fn invalid_length(len: usize, exp: &dyn Expected) -> Self
Raised when deserializing a sequence or map and the input data contains
too many or too few elements. Read more
source§fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
Raised when a
Deserialize
enum type received a variant with an
unrecognized name.source§fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
Raised when a
Deserialize
struct type received a field with an
unrecognized name.source§fn missing_field(field: &'static str) -> Self
fn missing_field(field: &'static str) -> Self
Raised when a
Deserialize
struct type expected to receive a required
field with a particular name but that field was not present in the
input.source§fn duplicate_field(field: &'static str) -> Self
fn duplicate_field(field: &'static str) -> Self
Raised when a
Deserialize
struct type received more than one of the
same field.source§impl<'a> From<DecodeStringError<'a>> for Error
impl<'a> From<DecodeStringError<'a>> for Error
source§fn from(err: DecodeStringError<'_>) -> Error
fn from(err: DecodeStringError<'_>) -> Error
Converts to this type from the input type.
source§impl From<MarkerReadError> for Error
impl From<MarkerReadError> for Error
source§fn from(err: MarkerReadError) -> Error
fn from(err: MarkerReadError) -> Error
Converts to this type from the input type.
source§impl From<NumValueReadError> for Error
impl From<NumValueReadError> for Error
source§fn from(err: NumValueReadError) -> Error
fn from(err: NumValueReadError) -> Error
Converts to this type from the input type.
source§impl From<ValueReadError> for Error
impl From<ValueReadError> for Error
source§fn from(err: ValueReadError) -> Error
fn from(err: ValueReadError) -> Error
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: Sized + AsExpression<T>,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: Sized + AsExpression<T>,
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
Convert
&self
to an expression for Diesel’s query builder. Read more