restless-web 0.1.1

Back-end framework inspired by express.js
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::route::RouteCallback;

pub trait RouteHandler {
    fn get(&mut self, path: &'static str, handler: RouteCallback) -> &mut Self;

    fn post(&mut self, path: &'static str, handler: RouteCallback) -> &mut Self;

    fn put(&mut self, path: &'static str, handler: RouteCallback) -> &mut Self;

    fn delete(&mut self, path: &'static str, handler: RouteCallback) -> &mut Self;

    fn patch(&mut self, path: &'static str, handler: RouteCallback) -> &mut Self;
}