Crate saphir[−][src]
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.
Re-exports
pub extern crate regex; |
pub extern crate hyper; |
Modules
header |
Headers types re-export |
Macros
reg |
Structs
BasicController |
An helper struct embedding a |
Body |
A stream of |
BodyGuard |
RequestGuard ensuring that a request has a body |
ControllerDispatch |
Struct to delegate a request to a registered function matching booth a |
Extensions |
A type map of protocol extensions. |
Method |
The Request Method (VERB) |
MiddlewareStack |
Struct representing the layering of middlewares in the server |
Request |
Represents an HTTP request. |
RequestGuardCollection | |
Response |
Represents an HTTP response |
Router |
A Struct responsible of dispatching request towards controllers |
Server |
The http server |
StatusCode |
An HTTP status code ( |
SyncRequest |
A Structure which represent an http request with a fully loaded body |
SyncResponse |
A Structure which represent a fully mutable http response |
Uri |
The URI component of a request. |
Version |
Represents a version of the HTTP spec. |
Enums
RequestContinuation |
Enum representing whether or not a request should continue to be processed be the server |
ServerError |
Potential server errors |
Traits
Controller |
Trait representing a controller |
LoadBody |
A trait allowing the implicit conversion of a Hyper::Request into a SyncRequest |
Middleware |
The trait a struct need to |
Payload |
This trait represents a streaming body of a |
RequestGuard |
A trait to provide an other layer of validation before allowing a request into a controller |
ToBody | |
ToRegex |
Trait to convert string type to regular expressions |