Expand description
§alux-http-parts
alux-http-parts states the parts a request and an answer are made of, for
alux-http interpretations that need them.
A request and an answer are stated here as values: DirectRequest is what a caller sent, and
DirectResponse is what answering it produced, neither naming a transport nor a framework. A crate
stating requests, such as alux-http-conformance, needs no interpreter to state them with, and an
interpretation answering them re-exports these rather than restating them.
It also reads a body arriving as parts, for interpretations whose framework does not read one itself.
Poem, axum, and Salvo read multipart bodies natively. The other interpreters receive only the bytes and media type, so this crate provides the shared multipart reader instead of duplicating it in each interpreter.
This crate names no framework. It turns the incoming bytes into ChunksAlg of PartAlg, the same
portable representation used by every interpretation that reads multipart bodies.
States the parts a request and an answer are made of, for interpretations that need them.
A request and an answer are values here, naming no transport and no framework, so a crate stating requests needs no interpreter to state them with.
Poem, axum, and Salvo each read parts themselves. The rest have the bytes and the media type a
caller sent and nothing that reads them, so what states the sequence is here rather than copied
into each of them. Nothing about a framework is named: what arrives is bytes, and what comes out
is alux_http::ChunksAlg of alux_http::PartAlg, the same as everywhere else.
Structs§
- Direct
Error - What the interpretation itself answers when no handler can be reached.
- Direct
Request - What a caller sent, stated without a transport.
- Direct
Response - What a surface answered, stated without a transport.
- Read
Part - One part a body states.
- Read
Part Content - What one part carries, as the chunks it arrives in.
- Read
Parts - The parts a body states, read from the bytes a caller sent.
Enums§
- Direct
Body - What an answer carries, which is either bytes already in hand or bytes still to come.
Type Aliases§
- Chunks
- What produces a body over time, once an interpretation has chosen how to carry it.