Enum ErrorKind
enum ErrorKind
The kinds of errors that can happen we deserializing into a Path.
This type is obtained through FailedToDeserializePathParams::kind or
FailedToDeserializePathParams::into_kind and is useful for building
more precise error messages.
Variants
-
WrongNumberOfParameters { got: usize, expected: usize } The URI contained the wrong number of parameters.
-
ParseErrorAtKey { key: String, value: String, expected_type: &'static str } Failed to parse the value at a specific key into the expected type.
This variant is used when deserializing into types that have named fields, such as structs.
-
ParseErrorAtIndex { index: usize, value: String, expected_type: &'static str } Failed to parse the value at a specific index into the expected type.
This variant is used when deserializing into sequence types, such as tuples.
-
ParseError { value: String, expected_type: &'static str } Failed to parse a value into the expected type.
This variant is used when deserializing into a primitive type (such as
Stringandu32).-
InvalidUtf8InPathParam { key: String } A parameter contained text that, once percent decoded, wasn't valid UTF-8.
-
UnsupportedType { name: &'static str } Tried to serialize into an unsupported type such as nested maps.
This error kind is caused by programmer errors and thus gets converted into a
500 Internal Server Errorresponse.-
DeserializeError { key: String, value: String, message: String } Failed to deserialize the value with a custom deserialization error.
-
Message(String) Catch-all variant for errors that don't fit any other variant.
Implementations
impl Debug for ErrorKind
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Display for ErrorKind
fn fmt(self: &Self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Eq for ErrorKind
impl Freeze for ErrorKind
impl PartialEq for ErrorKind
fn eq(self: &Self, other: &ErrorKind) -> bool
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl StructuralPartialEq for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
impl<Q, K> Equivalent for ErrorKind
fn equivalent(self: &Self, key: &K) -> bool
impl<Q, K> Equivalent for ErrorKind
fn equivalent(self: &Self, key: &K) -> bool
impl<T> Any for ErrorKind
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for ErrorKind
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for ErrorKind
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for ErrorKind
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for ErrorKind
impl<T> Same for ErrorKind
impl<T> ToString for ErrorKind
fn to_string(self: &Self) -> String
impl<T> WithSubscriber for ErrorKind
impl<T, U> Into for ErrorKind
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for ErrorKind
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for ErrorKind
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<V, T> VZip for ErrorKind
fn vzip(self: Self) -> V