#[non_exhaustive]pub enum InsertError {
Conflict {
with: String,
},
Parse(Utf8Error),
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.
Parse(Utf8Error)
Route path is not in utf-8 format.
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 duplicate 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 From<Utf8Error> for InsertError
impl From<Utf8Error> for InsertError
Source§impl PartialEq for InsertError
impl PartialEq 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