ogre-stream-ext

Crates.ioogre-stream-ext
lib.rsogre-stream-ext
version0.1.6
created_at2025-07-19 17:24:57.420312+00
updated_at2025-09-19 23:39:55.483028+00
description`futures` shortcuts with ergonomic extensions to unlock the full power of Streams in Rust
homepagehttps://github.com/zertyz/ogre-stream-ext
repositoryhttps://github.com/zertyz/ogre-stream-ext
max_upload_size
id1760402
size198,817
Luiz Silveira (zertyz)

documentation

https://docs.rs/ogre-stream-ext/

README

futures & futures-util shortcuts with ergonomic extensions to unlock the full power of Streams in Rust

This crate extends the Stream support offered by both futures & futures-util, adding the necessary functionalities to enable useful and neat patterns when working with Streams for event driven and reactive programming, with fill support for error handling patterns.

Alpha Status

We are still in early infancy with still some unstable & experimental APIs, missing docs, and even not fully optimized implementations.

Additional "administrative events" callbacks:

  • Stream Finalization -- Introduces a "on close" & "on cancellation" callbacks to give notice that the Stream is ending. The "on close" callback is able to yield an optional final item to the Stream.
  • Item production Timeout -- closes the Stream if new items do not arrive within some time limit, optionally yielding a final item (possibly a Timeout Error).

Misc features

  • Items Buffer -- Allows the accumulation of some items so the producer is not slown down if the consumer glitches a little. Also used to reduce the pipeline latency -- when buffer is 1.
  • Rate Keeper -- tight control over the maximum items flowing through the Stream, to preserve computational resources. This implementation is more precise and more optimized than the one offered by whatever-trait -- please see the benchmarks -- and yet more flexible in regard to keeping up the pace if temporary slowdowns occur.
  • try_ extensions -- multiple new .try_ combinators simply missing from the features::TryStreamExt extension, such as:
    • .try_enumerate() & .try_enumerate_all()
    • .try_count()
Commit count: 14

cargo fmt