Expand description
§Pavex - API reference
Welcome to the API reference for Pavex!
The API reference is fairly low-level.
If you want a high-level overview of Pavex, check out the documentation
on Pavex’s website.
You’ll also find an installation guide as well as a
quickstart tutorial
to get you up and running with the framework in no time.
Modules§
- blueprint
- Define the structure of your application using a
Blueprint
. - config
- Utilities to load the hierarchical configuration for a Pavex application.
- connection
- Extract data concerning the HTTP connection.
- cookie
- Everything you need to work with HTTP cookies.
- error
- Error handling utilities.
- http
- Types related to the HTTP protocol (status codes, headers, etc).
- middleware
- Middleware types and utilities.
- request
- Process and extract data from incoming HTTP requests.
- response
- Build HTTP responses, from scratch or by converting existing types.
- router
- Dispatch requests to the appropriate handler.
- serialization
- Serialization and deserialization utilities.
- server
- An HTTP
Server
and its supporting types, the toolkit you need to launch your Pavex application. - telemetry
- Tools to instrument and troubleshoot your Pavex applications.
- time
- Utilities to work with dates, timestamps and datetimes.
- tls
- Secure your server and client connections with TLS (Transport Layer Security).
- unit
- Type-safe wrappers for working with measurable quantities (e.g. bytes).
Structs§
- Blueprint
- The structure of your Pavex application.
- Error
- Pavex’s error type: an opaque wrapper around the concrete error type return by your components (e.g. request handlers, constructors, etc.). It is used as an input parameter by error observers and universal error handlers.
- Response
- Represents an HTTP response.
Traits§
- Into
Response - Convert a type into a
Response
.
Attribute Macros§
- config
- Define a configuration type.
- delete
- Define a route for DELETE requests to a given path.
- error_
handler - Define an error handler.
- error_
observer - Define an error observer.
- fallback
- Define a fallback handler.
- get
- Define a route for GET requests to a given path.
- head
- Define a route for HEAD requests to a given path.
- methods
- A helper macro to support Pavex attributes on methods.
- options
- Define a route for OPTIONS requests to a given path.
- patch
- Define a route for PATCH requests to a given path.
- post
- Define a route for POST requests to a given path.
- post_
process - Define a post-processing middleware.
- pre_
process - Define a pre-processing middleware.
- prebuilt
- Define a prebuilt type.
- put
- Define a route for PUT requests to a given path.
- request_
scoped - Define a request-scoped constructor.
- route
- Define a route for requests to a given path.
- singleton
- Define a singleton constructor.
- transient
- Define a transient constructor.
- wrap
- Define a wrapping middleware.