proxima-primitives 0.1.0

The pipe algebra itself: the Pipe trait — an async In -> Result<Out, Err> that becomes a transform, source, sink or observe by choice of types — plus its three tier siblings (SendPipe, UnpinPipe, UnpinSendPipe), Handler, SourcePipe, the payload types Carry, ResponseStream and RequestStream (buffered bodies are plain Bytes), HeaderList, the sans-IO byte-stream traits, runtime-agnostic concurrency primitives, and the Replay/GenericStream transport seam. Everything else in proxima composes what is defined here.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Graceful-shutdown response type shared by HTTP/1/2/3 listeners.
//! When a listener begins draining, it returns this shape to in-flight
//! requests so the dispatcher can emit a `503 Retry-After`-style
//! response instead of accepting new work.
//!
//! Lives in proxima-pipe (rather than a specific HTTP-version crate)
//! because every HTTP listener needs it and we don't want HTTP-version
//! crates depending on each other for this small value type.

#![cfg(feature = "alloc")]

use alloc::string::String;

#[derive(Debug)]
pub struct QuiesceResponse {
    pub status: u16,
    pub retry_after: String,
}