1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! The pipe algebra and the runtime-agnostic primitives beneath it.
//!
//! One trait, [`pipe::Pipe`], carries typed `In -> Out` with an associated
//! `Err`; picking `In` or `Out` as `()` gives the four forms (transform,
//! source, sink, observe). Everything else here composes over it or sits
//! under it.
//!
//! - [`pipe`] -- [`pipe::Pipe`] and its additive `Send` form
//! [`pipe::SendPipe`], the [`PipeExt`] combinator sugar
//! (`.and_then`/`.filter`/`.fanout`/`.fanin`), `Request`/`Response`
//! envelopes over `Bytes`, `HeaderList`, the streaming bodies
//! (`ResponseStream`/`RequestStream` over `ChunkStream`) and the in-process
//! `Carry` payload, `Handler` (`Request<Bytes> -> Response<Bytes>`),
//! `SourcePipe`, and the resilience, rate-limit, retry, routing and
//! telemetry/capture surfaces. Plugin authors' primary surface.
//! - [`sync`] -- runtime-agnostic concurrency primitives shaped like
//! `tokio::sync` (`Mutex`, `Notify`, `mpsc`, `oneshot`, `watch`,
//! `broadcast`, plus `blocking`, `task`, `shutdown`), so no pipe needs
//! tokio to coordinate.
//! - [`stream`] -- byte-stream and datagram traits (`StreamConnection`,
//! `StreamListener`, `StreamUpstream`, `DatagramSocket`) built on
//! `futures::io`, shared by every wire-protocol stack above them.
//! - [`transport`] -- `Replay` (record-and-replay of a stream with fan-out
//! sinks), the `tap_complete` taps and the `GenericStream` seam; sits below
//! [`pipe`].
//! - [`driver`] -- [`block_on`], the no-runtime way to drive one future to
//! completion.
//! - [`codec`], [`block_layout`], [`float_layout`] -- data descriptions of
//! packed numeric storage: [`Codec`] names a packed byte layout,
//! `BlockLayout` describes a block of stored numbers, `FloatLayout` one
//! stored float.
//!
//! The crate is `no_std` unless the default `std` feature is on. `pipe`
//! splits further: the pipe forms compile with no allocator, most of the
//! envelope and combinator surface needs `alloc`, and registries and
//! lifecycle helpers need `std`. Each item's own doc names its tier.
extern crate alloc;
// the test harness always links std; a no_std crate must name it explicitly
// so `sync::blocking::futex`'s tests (compiled only when `std` is off)
// resolve `std::`.
extern crate std;
pub use Codec;
pub use block_on;
// Fluent combinator sugar (`.and_then`/`.filter`/`.fanout`/`.fanin`) over the
// pipe algebra — no prelude in this crate, so callers reach it via an
// explicit `use proxima_primitives::PipeExt`.
pub use PipeExt;