novel 0.4.2

my web framework.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14

use crate::{Context};

/// `Handler`s are responsible for handling requests by creating Responses from Requests.
pub trait Handler: Send + Sync + 'static {
  /// Produce a `Response` from a Request, with the possibility of error.
    fn handle(&self, ctx: &mut Context);
}

impl<F> Handler for F where F: Send + Sync + 'static + Fn(&mut Context) {
  fn handle(&self, ctx: &mut Context){
    (*self)(ctx);
  }
}