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
use std::pin::Pin;

use futures::Stream;

use proxima_core::ProximaError;

/// Boxed, send-able generic stream of fallible items.
/// The uniform stream seam for all transport primitives in this crate.
pub type GenericStream<T> = Pin<Box<dyn Stream<Item = Result<T, ProximaError>> + Send>>;