[−][src]Struct trek_router::Router
Methods
impl<T> Router<T> where
T: Clone,
[src]
T: Clone,
pub fn new() -> Self
[src]
pub fn middleware(&mut self, handler: T) -> &mut Self
[src]
pub fn group(&mut self, path: &str, build: impl FnOnce(&mut Router<T>))
[src]
pub fn handle(&mut self, method: Method, path: &str, handler: T) -> &mut Self
[src]
pub fn get(&mut self, path: &str, handler: T) -> &mut Self
[src]
pub fn post(&mut self, path: &str, handler: T) -> &mut Self
[src]
pub fn delete(&mut self, path: &str, handler: T) -> &mut Self
[src]
pub fn patch(&mut self, path: &str, handler: T) -> &mut Self
[src]
pub fn put(&mut self, path: &str, handler: T) -> &mut Self
[src]
pub fn options(&mut self, path: &str, handler: T) -> &mut Self
[src]
pub fn head(&mut self, path: &str, handler: T) -> &mut Self
[src]
pub fn connect(&mut self, path: &str, handler: T) -> &mut Self
[src]
pub fn trace(&mut self, path: &str, handler: T) -> &mut Self
[src]
pub fn any(&mut self, path: &str, handler: T) -> &mut Self
[src]
pub fn find<'a>(
&'a self,
method: &'a Method,
path: &'a str
) -> Option<(&'a T, Vec<(&'a str, &'a str)>)>
[src]
&'a self,
method: &'a Method,
path: &'a str
) -> Option<(&'a T, Vec<(&'a str, &'a str)>)>
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,