Expand description
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
Modules
Headers types re-export
Macros
Structs
An helper struct embedding a
ControllerDispatch
.A stream of
Chunk
s, used when receiving bodies.RequestGuard ensuring that a request has a body
Struct to delegate a request to a registered function matching booth a
method
and a path
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
Handle to signal the server on termination
An HTTP status code (
status-code
in RFC 7230 et al.).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.
Enums
Enum representing whether or not a request should continue to be processed be the server
Potential server errors
Traits
Trait representing a controller
A trait allowing the implicit conversion of a Hyper::Request into a SyncRequest
The trait a struct need to
impl
to be considered as a middlewareThis trait represents a streaming body of a
Request
or Response
.A trait to provide an other layer of validation before allowing a request into a controller
Trait to convert string type to regular expressions