Enum matchit::InsertError [−][src]
#[non_exhaustive] pub enum InsertError { Conflict { with: String, }, TooManyParams, UnnamedParam, InvalidCatchAll, MalformedPath, }
Expand description
Represents errors that can occur when inserting a new route.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Expand description
The inserted path conflicts with an existing route.
This error may unexpectedly come up when registering routes like the following:
/user/:id
/user/get
This is due to the strict requirements of the internal radix tree, and should be fixed in the future.
Show fields
Fields of Conflict
with: String
Expand description
The existing route that the insertion is conflicting with.
Expand description
Only one parameter per path segment is allowed.
Expand description
Parameters must be registered with a name.
Expand description
Catch-all parameters are only allowed at the end of a path.
Expand description
Invalid tokens in the inserted path.
Trait Implementations
impl Clone for InsertError
[src]
impl Clone for InsertError
[src]fn clone(&self) -> InsertError
[src]
fn clone(&self) -> InsertError
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for InsertError
[src]
impl Debug for InsertError
[src]impl Display for InsertError
[src]
impl Display for InsertError
[src]impl Error for InsertError
[src]
impl Error for InsertError
[src]fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0[src]
fn description(&self) -> &str
1.0.0[src]use the Display impl or to_string()
impl Hash for InsertError
[src]
impl Hash for InsertError
[src]impl Ord for InsertError
[src]
impl Ord for InsertError
[src]impl PartialEq<InsertError> for InsertError
[src]
impl PartialEq<InsertError> for InsertError
[src]fn eq(&self, other: &InsertError) -> bool
[src]
fn eq(&self, other: &InsertError) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &InsertError) -> bool
[src]
fn ne(&self, other: &InsertError) -> bool
[src]This method tests for !=
.
impl PartialOrd<InsertError> for InsertError
[src]
impl PartialOrd<InsertError> for InsertError
[src]fn partial_cmp(&self, other: &InsertError) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &InsertError) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for InsertError
[src]
impl StructuralEq for InsertError
[src]
impl StructuralPartialEq for InsertError
[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more