pub struct Route<'a, V> { /* private fields */ }
Implementations§
Source§impl<'a, V> Route<'a, V>
impl<'a, V> Route<'a, V>
Sourcepub fn new(regex: &'a str, params: Vec<&'a str>) -> Self
pub fn new(regex: &'a str, params: Vec<&'a str>) -> Self
Construct a Route from its base constituents (raw regex and parameter names).
Sourcepub fn set(&mut self, method: &'a str, handler: V)
pub fn set(&mut self, method: &'a str, handler: V)
Inserts (and potentially overrides) a handler for a specific request method.
Auto Trait Implementations§
impl<'a, V> Freeze for Route<'a, V>
impl<'a, V> RefUnwindSafe for Route<'a, V>where
V: RefUnwindSafe,
impl<'a, V> Send for Route<'a, V>where
V: Send,
impl<'a, V> Sync for Route<'a, V>where
V: Sync,
impl<'a, V> Unpin for Route<'a, V>where
V: Unpin,
impl<'a, V> UnwindSafe for Route<'a, V>where
V: UnwindSafe,
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