Skip to main content

Crate volter_core

Crate volter_core 

Source
Expand description

Core traits and types for Volter.

This crate defines the foundational abstractions the rest of the Volter ecosystem builds on:

See ARCHITECTURE.md at the workspace root for the reasoning behind this design, and RULES.md for the constraints every implementation must follow.

Re-exports§

pub use http;

Structs§

HandlerService
A tower::Service adapter that wraps a Handler together with its state.
State
Extract typed application state.
UrlParams
Path parameters extracted by the router from a parameterized route.

Traits§

FromRequest
Extract a typed value that may need the request body (e.g. Json<T>).
FromRequestParts
Extract a typed value from the request’s http::request::Parts (method, URI, headers, extensions) without consuming the body.
Handler
A request handler: any async function whose arguments are extractors, and whose return type implements IntoResponse.
IntoResponse
Turn a value into an HTTP Response.

Functions§

empty_body
Create an empty boxed body.
full_body
Create a boxed body from a chunk of bytes.

Type Aliases§

Body
The default request/response body type used throughout Volter.
BoxBody
A type-erased, Send HTTP body used throughout Volter.
BoxError
A boxed, dynamic error used where callers need Send + Sync + 'static.
Request
The request type used throughout Volter: a thin alias over http::Request with a boxed, streaming body.
Response
The response type used throughout Volter.