hteapot 0.6.5

HTeaPot is a lightweight HTTP server library designed to be easy to use and extend.
Documentation
1
2
3
4
5
6
7
8
9
use crate::{hteapot::HttpResponseCommon, utils::Context};

pub trait Handler {
    fn run(&self, context: &mut Context) -> Box<dyn HttpResponseCommon>;
}

pub trait HandlerFactory {
    fn is(context: &Context) -> Option<Box<dyn Handler>>;
}