[][src]Trait burner::RouterService

pub trait RouterService {
    fn get(&mut self, path: &str, f: Controller) -> &mut Self;
fn post(&mut self, path: &str, f: Controller) -> &mut Self;
fn put(&mut self, path: &str, f: Controller) -> &mut Self;
fn delete(&mut self, path: &str, f: Controller) -> &mut Self;
fn middleware(
        &mut self,
        path: &str,
        f: Box<dyn Fn(&Request, &Response) + Send + Sync + 'static>
    ) -> &mut Self;
fn mount(&mut self, relative_path: &str, router: Router) -> &mut Self; }

Required methods

fn get(&mut self, path: &str, f: Controller) -> &mut Self

fn post(&mut self, path: &str, f: Controller) -> &mut Self

fn put(&mut self, path: &str, f: Controller) -> &mut Self

fn delete(&mut self, path: &str, f: Controller) -> &mut Self

fn middleware(
    &mut self,
    path: &str,
    f: Box<dyn Fn(&Request, &Response) + Send + Sync + 'static>
) -> &mut Self

fn mount(&mut self, relative_path: &str, router: Router) -> &mut Self

Loading content...

Implementors

impl RouterService for Router[src]

impl RouterService for Server[src]

Loading content...