Modules§
- connect_
info - Extractor for getting connection information from a client.
- method_
routing - Route to services and handlers based on HTTP methods.
- multipart
- Extractor that parses
multipart/form-datarequests commonly used with file uploads. - path
- Extractor that will get captures from the URL and parse them using
[
serde]. - rejection
- Rejection response types.
- ws
- Handle WebSocket connections.
Structs§
- AddExtension
- Middleware for adding some shareable value to request extensions.
- AsService
- Service returned by
MakeService::as_service. - Body
- The body type used in axum requests and responses.
- Body
Bytes - Concrete implementation of (Body).
- Bytes
- A cheaply cloneable and sliceable chunk of contiguous memory.
- Connect
Info - Extractor for getting connection information produced by a
Connected. - Default
Body Limit - Layer for configuring the default request body limit.
- Default
Headers Layer - middleware to set default HTTP response headers
- Extension
- Extractor and response for extensions.
- Form
- URL encoded extractor and response.
- From
Extractor - Middleware that runs an extractor and discards the value.
- From
Extractor Layer Layerthat appliesFromExtractorthat runs an extractor and discards the value.- FromFn
- A middleware created from an async function.
- From
FnLayer - A
tower::Layerfrom an async function. - Header
Map - A set of HTTP headers
- Header
Name - Represents an HTTP header field name
- Header
Value - Represents an HTTP header field value.
- Into
Make Service - A
MakeServicethat produces axum router services. - Into
Service - Service returned by
MakeService::into_service. - Json
- JSON Extractor / Response.
- MapRequest
- A middleware created from an async function that transforms a request.
- MapRequest
Layer - A
tower::Layerfrom an async function that transforms a request. - MapResponse
- A middleware created from an async function that transforms a response.
- MapResponse
Layer - A
tower::Layerfrom an async function that transforms a response. - Matched
Path - Access the path in the router that matches the request.
- Method
Filter - A filter that matches one or more HTTP methods.
- Method
Router - A
Servicethat accepts requests based on aMethodFilterand allows chaining additional handlers and services. - Multipart
- Extractor that parses
multipart/form-datarequests (commonly used with file uploads). - Nested
Path - Access the path the matched the route is nested at.
- Next
- The remainder of a middleware stack, including the handler.
- Original
Uri - Extractor that gets the original request URI regardless of nesting.
- Path
- Extractor that will get captures from the URL and parse them using
serde. - ProductOS
Router - Query
- Extractor that deserializes query strings into some type.
- RawForm
- Extractor that extracts raw form requests.
- RawPath
Params - Extractor that will get captures from the URL without deserializing them.
- RawQuery
- Extractor that extracts the raw query string, without parsing it.
- Redirect
- Response that redirects the request to another location.
- Request
- Represents an HTTP request.
- Request
Method - Request
Parts - Component parts of an HTTP
Request - Response
- Represents an HTTP response
- Response
Axum Body - Service generated by
ResponseAxumBodyLayer. - Response
Axum Body Future - Response future for
ResponseAxumBody. - Response
Axum Body Layer - Layer that transforms the Response body to
crate::body::Body. - Response
Parts - Component parts of an HTTP
Response - Route
- How routes are stored inside a
Router. - Router
- The router type for composing handlers and services.
- Router
AsService - A
Routerconverted into a borrowedServicewith a fixed body type. - Router
Into Service - A
Routerconverted into an ownedServicewith a fixed body type. - Service
Builder - Declaratively construct
Servicevalues. - Service
Fn - A
Serviceimplemented by a closure. - Shared
- A
MakeServicethat produces services by cloning an inner service. - Shared
Future - Response future from
Sharedservices. - State
- Extractor for state.
- Status
Code - An HTTP status code (
status-codein RFC 9110 et al.). - Upgrade
Http Layer - Uri
- The URI component of a request.
- WebSocket
- A stream of WebSocket messages.
- WebSocket
Upgrade - Extractor for establishing WebSocket connections.
Enums§
- Message
- A WebSocket message.
- Method
- ProductOS
Router Error
Traits§
- FromRef
- Used to do reference-to-value conversions thus not consuming the input value.
- From
Request - Types that can be created from requests.
- From
Request Parts - Types that can be created from request parts.
- Handler
- Trait for async functions that can be used to handle requests.
- Http
Body - Trait representing a streaming body of a Request or Response.
- Into
MapRequest Result - Trait implemented by types that can be returned from
map_request,map_request_with_state. - Into
Response - Trait for generating responses.
- Layer
- Decorates a
Service, transforming either the request or the response. - Make
Connection - The
MakeConnectiontrait is used to create transports. - Make
Service - Creates new
Servicevalues. - Optional
From Request - Customize the behavior of
Option<Self>as aFromRequestextractor. - Optional
From Request Parts - Customize the behavior of
Option<Self>as aFromRequestPartsextractor. - Service
- An asynchronous function from a
Requestto aResponse. - Service
Ext - An extension trait for
Services that provides a variety of convenient adapters
Functions§
- any
- Route requests with the given handler regardless of the method.
- any_
service - Route requests to the given service regardless of its method.
- connect
- Route
CONNECTrequests to the given handler. - connect_
service - Route
CONNECTrequests to the given service. - delete
- Route
DELETErequests to the given handler. - delete_
service - Route
DELETErequests to the given service. - from_
extractor - Create a middleware from an extractor.
- from_
extractor_ with_ state - Create a middleware from an extractor with the given state.
- from_fn
- Create a middleware from an async function.
- from_
fn_ with_ state - Create a middleware from an async function with the given state.
- get
- Route
GETrequests to the given handler. - get_
service - Route
GETrequests to the given service. - head
- Route
HEADrequests to the given handler. - head_
service - Route
HEADrequests to the given service. - map_
request - Create a middleware from an async function that transforms a request.
- map_
request_ with_ state - Create a middleware from an async function that transforms a request, with the given state.
- map_
response - Create a middleware from an async function that transforms a response.
- map_
response_ with_ state - Create a middleware from an async function that transforms a response, with the given state.
- on
- Route requests with the given method to the handler.
- on_
service - Route requests with the given method to the service.
- options
- Route
OPTIONSrequests to the given handler. - options_
service - Route
OPTIONSrequests to the given service. - patch
- Route
PATCHrequests to the given handler. - patch_
service - Route
PATCHrequests to the given service. - post
- Route
POSTrequests to the given handler. - post_
service - Route
POSTrequests to the given service. - put
- Route
PUTrequests to the given handler. - put_
service - Route
PUTrequests to the given service. - service_
fn - Returns a new
ServiceFnwith the given closure. - trace
- Route
TRACErequests to the given handler. - trace_
service - Route
TRACErequests to the given service.
Type Aliases§
- BoxError
- Alias for a type-erased error type.