1#[macro_use]
10extern crate error_chain;
11extern crate futures;
12#[cfg(feature = "handler")]
13extern crate http;
14extern crate hyper;
15#[cfg(feature = "handler")]
16extern crate luminal_handler;
17
18mod error;
19mod route;
20mod tree;
21#[cfg(feature = "handler")]
22mod handler;
23#[cfg(not(feature = "handler"))]
24mod service;
25
26use futures::future::Future;
27use hyper::server::Response;
28#[cfg(not(feature = "handler"))]
29use hyper::server::{Request, Service};
30
31#[cfg(feature = "handler")]
32pub use handler::{FnRouteBuilder, HandlerRouteBuilder, Router};
33#[cfg(not(feature = "handler"))]
34pub use service::{FnRouteBuilder, Router, ServiceRouteBuilder};
35
36pub use error::Error as LuminalError;
37pub use error::ErrorKind as LuminalErrorKind;
38
39pub type LuminalFuture = Box<Future<Item = Response, Error = hyper::Error>>;
41
42#[cfg(not(feature = "handler"))]
43type LuminalService =
44 Service<Request = Request, Response = Response, Error = hyper::Error, Future = LuminalFuture>;