pub struct Route(/* private fields */);
Expand description
Route definition
Implementations§
Source§impl Route
impl Route
pub fn all<F>(path: &str, handler: F) -> Selfwhere
F: Fn(HttpRequest, HttpResponse) -> Result<(HttpRequest, HttpResponse), (HttpRequest, HttpResponse, Box<dyn Error>)> + Send + Sync + 'static,
pub fn get<F>(path: &str, handler: F) -> Selfwhere
F: Fn(HttpRequest, HttpResponse) -> Result<(HttpRequest, HttpResponse), (HttpRequest, HttpResponse, Box<dyn Error>)> + Send + Sync + 'static,
pub fn post<F>(path: &str, handler: F) -> Selfwhere
F: Fn(HttpRequest, HttpResponse) -> Result<(HttpRequest, HttpResponse), (HttpRequest, HttpResponse, Box<dyn Error>)> + Send + Sync + 'static,
pub fn put<F>(path: &str, handler: F) -> Selfwhere
F: Fn(HttpRequest, HttpResponse) -> Result<(HttpRequest, HttpResponse), (HttpRequest, HttpResponse, Box<dyn Error>)> + Send + Sync + 'static,
pub fn patch<F>(path: &str, handler: F) -> Selfwhere
F: Fn(HttpRequest, HttpResponse) -> Result<(HttpRequest, HttpResponse), (HttpRequest, HttpResponse, Box<dyn Error>)> + Send + Sync + 'static,
pub fn delete<F>(path: &str, handler: F) -> Selfwhere
F: Fn(HttpRequest, HttpResponse) -> Result<(HttpRequest, HttpResponse), (HttpRequest, HttpResponse, Box<dyn Error>)> + Send + Sync + 'static,
Auto Trait Implementations§
impl Freeze for Route
impl !RefUnwindSafe for Route
impl Send for Route
impl Sync for Route
impl Unpin for Route
impl !UnwindSafe for Route
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