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-data
requests 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 Layer
that appliesFromExtractor
that runs an extractor and discards the value.- FromFn
- A middleware created from an async function.
- From
FnLayer - A
tower::Layer
from 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
MakeService
that 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::Layer
from an async function that transforms a request. - MapResponse
- A middleware created from an async function that transforms a response.
- MapResponse
Layer - A
tower::Layer
from 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
Service
that accepts requests based on aMethodFilter
and allows chaining additional handlers and services. - Multipart
- Extractor that parses
multipart/form-data
requests (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
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
Router
converted into a borrowedService
with a fixed body type. - Router
Into Service - A
Router
converted into an ownedService
with a fixed body type. - Service
Builder - Declaratively construct
Service
values. - Service
Fn - A
Service
implemented by a closure. - Shared
- A
MakeService
that produces services by cloning an inner service. - Shared
Future - Response future from
Shared
services. - State
- Extractor for state.
- Status
Code - An HTTP status code (
status-code
in 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
MakeConnection
trait is used to create transports. - Make
Service - Creates new
Service
values. - Optional
From Request - Customize the behavior of
Option<Self>
as aFromRequest
extractor. - Optional
From Request Parts - Customize the behavior of
Option<Self>
as aFromRequestParts
extractor. - Service
- An asynchronous function from a
Request
to aResponse
. - Service
Ext - An extension trait for
Service
s 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
CONNECT
requests to the given handler. - connect_
service - Route
CONNECT
requests to the given service. - delete
- Route
DELETE
requests to the given handler. - delete_
service - Route
DELETE
requests 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
GET
requests to the given handler. - get_
service - Route
GET
requests to the given service. - head
- Route
HEAD
requests to the given handler. - head_
service - Route
HEAD
requests 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
OPTIONS
requests to the given handler. - options_
service - Route
OPTIONS
requests to the given service. - patch
- Route
PATCH
requests to the given handler. - patch_
service - Route
PATCH
requests to the given service. - post
- Route
POST
requests to the given handler. - post_
service - Route
POST
requests to the given service. - put
- Route
PUT
requests to the given handler. - put_
service - Route
PUT
requests to the given service. - service_
fn - Returns a new
ServiceFn
with the given closure. - trace
- Route
TRACE
requests to the given handler. - trace_
service - Route
TRACE
requests to the given service.
Type Aliases§
- BoxError
- Alias for a type-erased error type.