Crate arc_reactor [−] [src]
arc-reactor
Minimalistic, Asynchronous, Multithreaded Web framework
-
Asynchronous. In arc reactor, route handlers are asynchronous by default.
-
Integration With futures-await. The
#[service]proc macro not only derives theArcServicetrait for your route handler, but also marks it as //!#[async]so you can await on futures in your route handlers with no extra stress. -
Intuitive Middleware System. arc reactor exposes a middleware system that is easy to reason about.
-
Minimalistic. arc reactor is designed to be a very thin abstraction over tokio and hyper.
-
Nightly Rust. arc reactor uses a lot of cool features, including
proc_macroswhich are only available on the nightly channel.
Installation
add this to your cargo.toml
arc-reactor = "0.1"
Guides
check out the examples folder to get a feel for how arc reactor, it's well documented. and i'm terrible at
explaining things without using code.
Re-exports
pub extern crate futures_await as futures; |
pub extern crate hyper; |
pub extern crate tokio_core; |
Modules
| header |
Headers container, and common header fields. |
| prelude |
Macros
| arc |
This macro exists for composing a route handler with middlewares in order to mount them on a router. |
| header | |
| mw |
Structs
| ArcHandler | |
| ArcReactor |
The main server, the ArcReactor is where you mount your routes, middlewares and initiate the server. |
| FakeReactor |
Fake reactor allows for testing your application's endpoints |
| RouteGroup |
The routegroup allows for conviniently nesting route handlers and applying group middlewares for protected routes |
| Router |
The main router of you application that is supplied to the ArcReactor. |
| bodyParser |
Enums
| JsonError |
the error returned by Request::json() |
| QueryParseError |
the error returned by Request::query() |
| StatusCode |
An HTTP status code ( |
Traits
| ArcService |
this trait is automatically derived by the #[service] proc_macro |
| MiddleWare |
The middleware Trait. In arc-reactor the middleware system is designed to be as intuitive and as simple as possible. |