Expand description
Re-exports§
Modules§
- extract
- Types and traits for extracting data from requests.
- 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.
$name
must implement FromRequest, but may borrow from the request. If extraction is rejected, the rejection is written to$response_writer
and the function returns. - from_
request_ parts - Extract values from Request Parts. Each
$name
must implement FromRequestParts, but may borrow from the request. If extraction is rejected, the rejection is written to$response_writer
and the function returns. - make_
static - Replacement for
static_cell::make_static
for use cases when the type is known.
Structs§
- Config
- Server Configuration.
- Response
Sent - A Marker showing that the response has been sent.
- 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?
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
Functions§
- serve
- Serve
app
with incoming requests. App has no state. - serve_
with_ state - Serve
app
with incoming requests. App has a state ofState
.
Type Aliases§
- AppRouter
- The Router for the app constructed from the Props (which implement AppBuilder).