Expand description
Zero-axum public HTTP types.
User code says arcly_http::Response, arcly_http::Json, etc. — no
axum::… paths in the public surface. Internally these are thin
delegations to axum, so we keep its battle-tested implementation without
welding it into the public API.
Why a private axum::response::Response re-export rather than a full
newtype: pinning axum::response::Response is the one type the
framework’s boundary code constructs; making it a newtype would force
every adapter / interceptor to unwrap repeatedly with zero behavioural
benefit. A pub use rename achieves the same “no axum in user paths”
outcome at zero runtime cost.
Modules§
- header
- Standard header-name constants:
header::CONTENT_TYPE,header::LOCATION,header::CONTENT_RANGE,header::CACHE_CONTROL,header::ACCEPT_RANGES, theheader::ACCESS_CONTROL_*family, and the rest of the IANA registry.
Structs§
- Body
- Response/request body.
Body::from(bytes),Body::from("text"), etc. The body type used in axum requests and responses. - Bytes
- Raw bytes buffer (
bytes::Bytes) — whatRequestContext::bodyreturns and what byte-oriented responses carry. - Header
Map - Owned, validated header name / value, and the multimap that holds them. A specialized multimap for header names and values.
- Header
Name - Owned, validated header name / value, and the multimap that holds them. Represents an HTTP header field name
- Header
Value - Owned, validated header name / value, and the multimap that holds them. Represents an HTTP header field value.
- Json
- JSON response wrapper.
Json(body)writesContent-Type: application/jsonand serialisesbodywithserde_json. Same surface as axum’sJsonso the route macro’s return-type walker (Json<T> | Result<Json<T>, _>) keeps working without changes. - Method
- HTTP method (
Method::GET, …). The Request Method (VERB) - Request
Parts - Decomposed request head (method, uri, headers, …). Named in the
BoundaryFiltertrait, so it must be reachable withoutaxum. - Response
Builder - The builder returned by
Response::builder— re-exported so it can be named in user function signatures (e.g. awith_cors(b: ResponseBuilder)helper) without reaching foraxum. An HTTP response builder - Status
Code - HTTP status code (
StatusCode::OK,StatusCode::PARTIAL_CONTENT, …). An HTTP status code (status-codein RFC 9110 et al.). - Uri
- Request URI. The URI component of a request.
Traits§
- Into
Response - Convert a value into a
Response.
Functions§
- byte_
range - Serve a (possibly partial) byte range from a fully-buffered resource.
- bytes_
response - Build a
Responsefrom a status, content type, and raw bytes.
Type Aliases§
- Response
- The framework’s response type. Same memory shape as axum’s; the alias
keeps the user-visible path
arcly_http::Response. Type alias forhttp::Responsewhose body type defaults toBody, the most common body type used with axum.