pub enum MatchError {
NotFound,
}
Expand description
A failed match attempt.
use matchit::{MatchError, Router};
let mut router = Router::new();
router.insert("/home", "Welcome!")?;
router.insert("/blog", "Our blog.")?;
// no routes match
if let Err(err) = router.at("/blo") {
assert_eq!(err, MatchError::NotFound);
}
Variants§
NotFound
No matching route was found.
Trait Implementations§
Source§impl Clone for MatchError
impl Clone for MatchError
Source§fn clone(&self) -> MatchError
fn clone(&self) -> MatchError
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 MatchError
impl Debug for MatchError
Source§impl Display for MatchError
impl Display for MatchError
Source§impl Error for MatchError
impl Error for MatchError
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 PartialEq for MatchError
impl PartialEq for MatchError
impl Copy for MatchError
impl Eq for MatchError
impl StructuralPartialEq for MatchError
Auto Trait Implementations§
impl Freeze for MatchError
impl RefUnwindSafe for MatchError
impl Send for MatchError
impl Sync for MatchError
impl Unpin for MatchError
impl UnwindSafe for MatchError
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)