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.
Headers types re-export
An helper struct embedding a
A stream of
RequestGuard ensuring that a request has a body
Struct to delegate a request to a registered function matching booth a
A type map of protocol extensions.
The Request Method (VERB)
Struct representing the layering of middlewares in the server
Represents an HTTP request.
A convenience class to contains RequestParams
Represents an HTTP response
A Struct responsible of dispatching request towards controllers
The http server
An HTTP status code (
A Structure which represent an http request with a fully loaded body
A Structure which represent a fully mutable http response
The URI component of a request.
Represents a version of the HTTP spec.
Enum representing whether or not a request should continue to be processed be the server
Potential server errors
Trait representing a controller
A trait allowing the implicit conversion of a Hyper::Request into a SyncRequest
The trait a struct need to
This trait represents a streaming body of a
A trait to provide an other layer of validation before allowing a request into a controller
Trait to convert string type to regular expressions