sark 0.1.0

Simple Asynchronous Rust webKit
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
mod router;
mod handler;

pub use router::{Router, Nil, Node, RouteNode};
pub use handler::FnHandler;

use crate::{
    http::{Request, Response},
    error::Result,
};

pub trait Service<State = ()> {
    async fn call(&self, req: Request, state: &State) -> Result<Response>;
}