#[non_exhaustive]pub enum InsertError {
Conflict {
with: String,
},
InvalidParamSegment,
InvalidParam,
InvalidCatchAll,
}
Expand description
Represents errors that can occur when inserting a new route.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Conflict
Attempted to insert a path that conflicts with an existing route.
InvalidParamSegment
Only one parameter per route segment is allowed.
Static segments are also allowed before a parameter, but not after it. For example,
/foo-{bar}
is a valid route, but /{bar}-foo
is not.
InvalidParam
Parameters must be registered with a valid name and matching braces.
Note you can use {{
or }}
to escape literal brackets.
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
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,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
Conflict
: 24 bytesInvalidParamSegment
: 0 bytesInvalidParam
: 0 bytesInvalidCatchAll
: 0 bytes