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
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§
source§impl Clone for InsertError
impl Clone for InsertError
source§fn clone(&self) -> InsertError
fn clone(&self) -> InsertError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for InsertError
impl Debug for InsertError
source§impl Display for InsertError
impl Display for InsertError
source§impl Error for InsertError
impl Error for InsertError
1.30.0 · 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 Hash for InsertError
impl Hash for InsertError
source§impl Ord for InsertError
impl Ord for InsertError
source§fn cmp(&self, other: &InsertError) -> Ordering
fn cmp(&self, other: &InsertError) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for InsertError
impl PartialEq for InsertError
source§impl PartialOrd for InsertError
impl PartialOrd for InsertError
impl Eq for InsertError
impl StructuralPartialEq for InsertError
Auto Trait Implementations§
impl Freeze for InsertError
impl RefUnwindSafe for InsertError
impl Send for InsertError
impl Sync for InsertError
impl Unpin for InsertError
impl UnwindSafe for InsertError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)