Crate product_os_router

Source

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.
BodyBytes
Concrete implementation of (Body).
Bytes
A cheaply cloneable and sliceable chunk of contiguous memory.
ConnectInfo
Extractor for getting connection information produced by a Connected.
DefaultBodyLimit
Layer for configuring the default request body limit.
DefaultHeadersLayer
middleware to set default HTTP response headers
Extension
Extractor and response for extensions.
Form
URL encoded extractor and response.
FromExtractor
Middleware that runs an extractor and discards the value.
FromExtractorLayer
Layer that applies FromExtractor that runs an extractor and discards the value.
FromFn
A middleware created from an async function.
FromFnLayer
A tower::Layer from an async function.
HeaderMap
A set of HTTP headers
HeaderName
Represents an HTTP header field name
HeaderValue
Represents an HTTP header field value.
IntoMakeService
A MakeService that produces axum router services.
IntoService
Service returned by MakeService::into_service.
Json
JSON Extractor / Response.
MapRequest
A middleware created from an async function that transforms a request.
MapRequestLayer
A tower::Layer from an async function that transforms a request.
MapResponse
A middleware created from an async function that transforms a response.
MapResponseLayer
A tower::Layer from an async function that transforms a response.
MatchedPath
Access the path in the router that matches the request.
MethodFilter
A filter that matches one or more HTTP methods.
MethodRouter
A Service that accepts requests based on a MethodFilter and allows chaining additional handlers and services.
Multipart
Extractor that parses multipart/form-data requests (commonly used with file uploads).
NestedPath
Access the path the matched the route is nested at.
Next
The remainder of a middleware stack, including the handler.
OriginalUri
Extractor that gets the original request URI regardless of nesting.
Path
Extractor that will get captures from the URL and parse them using serde.
ProductOSRouter
Query
Extractor that deserializes query strings into some type.
RawForm
Extractor that extracts raw form requests.
RawPathParams
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.
RequestMethod
RequestParts
Component parts of an HTTP Request
Response
Represents an HTTP response
ResponseParts
Component parts of an HTTP Response
Route
How routes are stored inside a Router.
Router
The router type for composing handlers and services.
RouterAsService
A Router converted into a borrowed Service with a fixed body type.
RouterIntoService
A Router converted into an owned Service with a fixed body type.
ServiceBuilder
Declaratively construct Service values.
ServiceFn
A Service implemented by a closure.
Shared
A MakeService that produces services by cloning an inner service.
SharedFuture
Response future from Shared services.
State
Extractor for state.
StatusCode
An HTTP status code (status-code in RFC 9110 et al.).
UpgradeHttpLayer
Uri
The URI component of a request.
WebSocket
A stream of WebSocket messages.
WebSocketUpgrade
Extractor for establishing WebSocket connections.

Enums§

Message
A WebSocket message.
Method
ProductOSRouterError

Traits§

FromRef
Used to do reference-to-value conversions thus not consuming the input value.
FromRequest
Types that can be created from requests.
FromRequestParts
Types that can be created from request parts.
Handler
Trait for async functions that can be used to handle requests.
HttpBody
Trait representing a streaming body of a Request or Response.
IntoMapRequestResult
Trait implemented by types that can be returned from map_request, map_request_with_state.
IntoResponse
Trait for generating responses.
Layer
Decorates a Service, transforming either the request or the response.
MakeConnection
The MakeConnection trait is used to create transports.
MakeService
Creates new Service values.
OptionalFromRequest
Customize the behavior of Option<Self> as a FromRequest extractor.
OptionalFromRequestParts
Customize the behavior of Option<Self> as a FromRequestParts extractor.
Service
An asynchronous function from a Request to a Response.
ServiceExt
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 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.