Enum ErrorKind

#[must_use]
#[non_exhaustive]
pub 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 String and u32).

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 Error response.

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.

Trait Implementations

impl Debug for ErrorKind

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Display for ErrorKind

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for ErrorKind

impl PartialEq for ErrorKind

fn eq(&self, other: &ErrorKind) -> bool

impl StructuralPartialEq for ErrorKind

Auto Trait Implementations

impl Freeze for ErrorKind

impl RefUnwindSafe for ErrorKind

impl Send for ErrorKind

impl Sync for ErrorKind

impl Unpin for ErrorKind

impl UnsafeUnpin for ErrorKind

impl UnwindSafe for ErrorKind

Blanket Implementations

impl<Q, K> Equivalent<K> for ErrorKind where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

fn equivalent(&self, key: &K) -> bool

impl<Q, K> Equivalent<K> for ErrorKind where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

fn equivalent(&self, key: &K) -> bool

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for ErrorKind where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for ErrorKind where ST: ?Sized, DT: ?Sized,

impl<T> Any for ErrorKind where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for ErrorKind where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for ErrorKind where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for ErrorKind

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for ErrorKind

impl<T> Read<Exclusive, BecauseExclusive> for ErrorKind where T: ?Sized,

impl<T> Same for ErrorKind

type Output = T;

impl<T> ToString for ErrorKind where T: Display + ?Sized,

fn to_string(&self) -> String

impl<T> WithSubscriber for ErrorKind

impl<T, U> Into<U> for ErrorKind where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for ErrorKind where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for ErrorKind where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

impl<V, T> VZip<V> for ErrorKind where V: MultiLane<T>,

fn vzip(self) -> V