Enum matchit::InsertError
source · [−]#[non_exhaustive]
pub enum InsertError {
Conflict {
with: String,
},
TooManyParams,
UnnamedParam,
InvalidCatchAll,
}
Expand description
Represents errors that can occur when inserting a new route.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Conflict
Fields
with: String
The existing route that the insertion is conflicting with.
Attempted to insert a path that conflicts with an existing route.
TooManyParams
Only one parameter per route segment is allowed.
UnnamedParam
Parameters must be registered with a name.
InvalidCatchAll
Catch-all parameters are only allowed at the end of a path.
Trait Implementations
sourceimpl Clone for InsertError
impl Clone for InsertError
sourcefn clone(&self) -> InsertError
fn clone(&self) -> InsertError
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for InsertError
impl Debug for InsertError
sourceimpl Display for InsertError
impl Display for InsertError
sourceimpl Error for InsertError
impl Error for InsertError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl Hash for InsertError
impl Hash for InsertError
sourceimpl Ord for InsertError
impl Ord for InsertError
sourcefn cmp(&self, other: &InsertError) -> Ordering
fn cmp(&self, other: &InsertError) -> Ordering
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<InsertError> for InsertError
impl PartialEq<InsertError> for InsertError
sourcefn eq(&self, other: &InsertError) -> bool
fn eq(&self, other: &InsertError) -> bool
sourceimpl PartialOrd<InsertError> for InsertError
impl PartialOrd<InsertError> for InsertError
sourcefn partial_cmp(&self, other: &InsertError) -> Option<Ordering>
fn partial_cmp(&self, other: &InsertError) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for InsertError
impl StructuralEq for InsertError
impl StructuralPartialEq for InsertError
Auto Trait Implementations
impl RefUnwindSafe for InsertError
impl Send for InsertError
impl Sync for InsertError
impl Unpin for InsertError
impl UnwindSafe for InsertError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more