pub struct CompiledRoute {
pub id: RouteId,
pub method: HttpMethod,
pub pattern: RoutePattern,
pub priority: usize,
}
Expand description
A compiled route ready for matching
Fields§
§id: RouteId
§method: HttpMethod
§pattern: RoutePattern
§priority: usize
Implementations§
Source§impl CompiledRoute
impl CompiledRoute
pub fn new(id: RouteId, method: HttpMethod, pattern: RoutePattern) -> Self
Sourcepub fn matches(&self, method: &HttpMethod, path: &str) -> bool
pub fn matches(&self, method: &HttpMethod, path: &str) -> bool
Check if this route matches the given method and path
Trait Implementations§
Source§impl Clone for CompiledRoute
impl Clone for CompiledRoute
Source§fn clone(&self) -> CompiledRoute
fn clone(&self) -> CompiledRoute
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 moreAuto Trait Implementations§
impl Freeze for CompiledRoute
impl RefUnwindSafe for CompiledRoute
impl Send for CompiledRoute
impl Sync for CompiledRoute
impl Unpin for CompiledRoute
impl UnwindSafe for CompiledRoute
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