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
//! `BoundedQueue<T>` — the alloc-tier bounded queue, re-exported from
//! [`proxima_core::ring`].
//!
//! The type and its overflow algorithm moved to `proxima-core` so the same
//! `FailMode` policy drives both the heap [`Ring`](proxima_core::ring::Ring)
//! (this alias) and the no-alloc
//! [`StaticRing`](proxima_core::ring::StaticRing) tiers from one implementation.
//! `SinkFront` and the recording/telemetry sinks compose this alias unchanged.

pub use proxima_core::ring::{EnqueueOutcome, FailMode};

/// A heap-backed bounded queue with a [`FailMode`] overflow policy — the alloc
/// tier of [`proxima_core::ring::BoundedQueue`]. `BoundedQueue::new(capacity,
/// fail_mode)` is unchanged; the no-alloc peer is
/// [`proxima_core::ring::StaticBoundedQueue`].
pub type BoundedQueue<T> = proxima_core::ring::HeapBoundedQueue<T>;