Skip to main content

Module prelude

Module prelude 

Source
Expand description

Prelude module for convenient imports.

Structs§

App
A configured web application.
AppBuilder
Builder for constructing an App.
AppConfig
Application configuration for the FastAPI Rust framework.
BasicAuth
Extracts HTTP Basic authentication credentials from the Authorization header.
BearerToken
Simple HTTP bearer token extractor.
Cookie
A cookie to set in the response.
Cors
CORS middleware.
CorsConfig
Cross-Origin Resource Sharing (CORS) configuration.
DefaultDependencyConfig
Default dependency configuration (cache per request).
DependencyOverrides
Dependency override registry (primarily for testing).
Depends
Dependency injection extractor.
Header
Header extractor for individual HTTP headers.
HttpError
HTTP error that produces a response.
Json
JSON body extractor.
NoCache
Disable caching for this dependency.
OAuth2PasswordBearer
OAuth2 password bearer security scheme extractor.
OpenApi
OpenAPI 3.1 document.
OpenApiBuilder
OpenAPI document builder.
Page
Paginated response wrapper.
Pagination
Pagination query parameters extractor.
Path
Path parameter extractor.
Query
Query string extractor.
Request
HTTP request.
RequestContext
Request context that wraps asupersync’s capability context.
RequestId
A request ID that was extracted or generated for the current request.
RequestIdMiddleware
Middleware that adds unique request IDs to requests and responses.
Response
HTTP response.
Route
A route definition with handler for request processing.
Router
Radix trie router.
Server
Synchronous HTTP server for request/response conversion.
ServerConfig
Server configuration for the HTTP/1.1 server.
State
State extractor for application-wide shared state.
StatusCode
HTTP status code.
ValidationError
A single validation error item.
ValidationErrors
Collection of validation errors (422 Unprocessable Entity response).

Enums§

ConfigError
Configuration loading errors.
DependencyScope
Dependency resolution scope.
Method
HTTP method.

Traits§

DependsConfig
Configuration for Depends resolution.
Deserialize
A data structure that can be deserialized from any data format supported by Serde.
FromDependency
Trait for types that can be injected as dependencies.
FromRequest
Trait for types that can be extracted from a request.
IntoResponse
Trait for types that can be converted into a response.
Serialize
A data structure that can be serialized into any data format supported by Serde.

Functions§

serve
Convenience function to serve an App on the given address.

Type Aliases§

DefaultConfig
Backwards-friendly alias for the default config.

Attribute Macros§

delete
Mark a function as a DELETE handler.
get
Mark a function as a GET handler.
head
Mark a function as a HEAD handler.
options
Mark a function as an OPTIONS handler.
patch
Mark a function as a PATCH handler.
post
Mark a function as a POST handler.
put
Mark a function as a PUT handler.

Derive Macros§

Deserialize
JsonSchema
Derive JSON Schema for OpenAPI.
Serialize
Validate
Derive validation for a struct.