1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#![deny(unused_extern_crates)]
#![deny(missing_docs)]
#![deny(warnings)]

//! # Saphir
//!
//! Saphir is a progressive http server framework based on Hyper-rs that aims to reduce the time spent on playing with futures and
//! limiting the amount of copied code amongst request matching.
//!
//! Saphir provide what's needed to easily start with your own server with middleware, controllers and request routing.
//!
//! Futures version will comes with more macro and a nightly experiment is currently being tested to reproduces decorator in rust.

#[macro_use]
extern crate log;
extern crate futures;
extern crate ansi_term;
extern crate http as http_types;
extern crate hyperx;
extern crate rayon;
extern crate tokio;
//extern crate tokio_executor;
//extern crate tokio_threadpool;
#[cfg(feature = "https")]
extern crate rustls;
#[cfg(feature = "https")]
extern crate tokio_rustls;
extern crate parking_lot;
pub extern crate regex;
pub extern crate hyper;

#[macro_use]
mod utils;
mod http;
mod error;
mod middleware;
mod controller;
mod router;
mod server;

pub use utils::*;
pub use http::*;
pub use utils::RequestContinuation;
pub use middleware::Middleware;
pub use middleware::MiddlewareStack;
pub use controller::Controller;
pub use controller::BasicController;
pub use controller::ControllerDispatch;
pub use controller::RequestGuard;
pub use controller::RequestGuardCollection;
pub use controller::BodyGuard;
pub use router::Router;
pub use server::Server;
pub use error::ServerError;