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
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 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl 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
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl Hash for InsertError
impl Hash for InsertError
sourceimpl Ord for InsertError
impl Ord for InsertError
sourceimpl PartialEq<InsertError> for InsertError
impl PartialEq<InsertError> for InsertError
sourcefn eq(&self, other: &InsertError) -> bool
fn eq(&self, other: &InsertError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &InsertError) -> bool
fn ne(&self, other: &InsertError) -> bool
This method tests for !=
.
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>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
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 more
impl 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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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