Expand description
Re-exports§
Modules§
- extract
- Types and traits for extracting data from requests.
- futures
- io
- IO Utility
- request
- HTTP request types.
- response
- HTTP response types.
- routing
- Route requests to the appropriate handler.
- time
- Timer for creating timeouts during request parsing and request handling.
- url_
encoded - UrlEncodedString and related types.
Macros§
- from_
request - Extract a value from a request.
$namemust implement FromRequest, but may borrow from the request. If extraction is rejected, the rejection is written to$response_writerand the function returns. - from_
request_ parts - Extract values from Request Parts. Each
$namemust implement FromRequestParts, but may borrow from the request. If extraction is rejected, the rejection is written to$response_writerand the function returns. - make_
static - Replacement for
static_cell::make_staticfor use cases when the type is known.
Structs§
- Config
- Server Configuration.
- Disconnection
Info - Information gathered once a
Serverhas disconnection, such as how many requests were handled and the shutdown reason if the server has graceful shutdown enabled. - Response
Sent - A Marker showing that the response has been sent.
- Server
- A HTTP Server.
- Timeouts
- How long to wait before timing out for different operations. If set to None, the operation never times out.
Enums§
- Error
- Errors arising while handling a request.
- Keep
Alive - After the response has been sent, should the connection be kept open to allow the client to make further requests on the same TCP connection?
- NoGraceful
Shutdown - Indicates that graceful shutdown is not enabled, so the
Servercannot report a graceful shutdown reason.
Traits§
- AppBuilder
- A helper trait which simplifies creating a static Router with no state.
- AppWith
State Builder - A helper trait which simplifies creating a static Router with a declared state.
- LogDisplay
Type Aliases§
- AppRouter
- The Router for the app constructed from the Props (which implement AppBuilder).