Crate sugars_async_stream

Crate sugars_async_stream 

Source
Expand description

Asynchronous programming utilities

Choose your runtime and get both AsyncTask and AsyncStream plus convenient macros:

  • tokio-async: Full Tokio ecosystem with mpsc channels
  • std-async: Runtime-agnostic using async-channel
  • crossbeam-async: Compute-heavy workloads with crossbeam + async-channel

Re-exports§

pub use stream::tokio::AsyncStream;
pub use emitter_builder::EmitterBuilder;
pub use emitter_builder::EmitterImpl;
pub use result_types::AsyncResult;
pub use result_types::AsyncResultChunk;
pub use stream_ext::StreamExt;

Modules§

emitter_builder
EmitterBuilder - builds AsyncStream with error handling
result_types
Result types that are allowed in AsyncTask and AsyncStream
stream
Async stream with built-in error handling and collection support
stream_ext
Stream extension traits for async stream processing

Macros§

emit
Macro for cleaner emit syntax
pipe
Pipe operator for fluent chaining of operations

Structs§

AsyncTask
Generic async task wrapper for single operations

Traits§

NotResult
Marker trait to prevent Result types in AsyncTask/AsyncStream