pub enum RouteLookup<'a, T> {
Match {
route: &'a T,
params: Vec<(String, String)>,
},
MethodNotAllowed {
allowed: Vec<Method>,
},
Redirect {
target: String,
},
NotFound,
}Expand description
Result of a route lookup.
Variants§
Match
A route matched.
Fields
MethodNotAllowed
Path matched but method not allowed.
Redirect
Redirect to a different path (308 Permanent Redirect).
Used for trailing slash normalization.
NotFound
No route matched.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for RouteLookup<'a, T>
impl<'a, T> RefUnwindSafe for RouteLookup<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for RouteLookup<'a, T>where
T: Sync,
impl<'a, T> Sync for RouteLookup<'a, T>where
T: Sync,
impl<'a, T> Unpin for RouteLookup<'a, T>
impl<'a, T> UnwindSafe for RouteLookup<'a, T>where
T: RefUnwindSafe,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).