Expand description
Re-exports of abstractions and implementations deemed useful and good by number 0 engineers.
Read up more on our challenges with rust’s async: https://www.iroh.computer/blog/async-rust-challenges-in-iroh
This library also allows importing a single task and time module that’ll work
in wasm*-*-unknown targets, using wasm_bindgen and wasm_bindgen_futures, but mirroring
the tokio API with only minor differences.
§Feature flags
serde: Enables serde support for thetime::SystemTimetype when building for WebAssembly.
Modules§
- boxed
- Re-exports boxed versions of
FutureandStreamtraits that areSendin non-wasm and!Sendin wasm. - future
- Combinators for the
Futuretrait. - io
- Tools and combinators for I/O.
- split
- Implementation and types for splitting a
Stream + Sink. Seesplit::split. - stream
- Combinators for the
Streamtrait. - task
- Async rust task spawning and utilities that work natively (using tokio) and in browsers (using wasm-bindgen-futures).
- time
- Sleep and timeout utilities that work natively (via tokio) and in the browser.
Macros§
- pin
- Pins a variable of type
Ton the stack and rebinds it asPin<&mut T>. - ready
- Unwraps
Poll<T>or returnsPending.
Structs§
- Buffer
Unordered - Stream for the
buffered_unorderedmethod. - Buffered
Ordered - Stream for the
buffered_orderedmethod. - Futures
Ordered - An unbounded queue of futures.
- Futures
Ordered Bounded - An unbounded queue of futures.
- Futures
Unordered - A set of futures which may complete in any order.
- Futures
Unordered Bounded - A set of futures which may complete in any order.
- JoinAll
- Future for the
join_allfunction. - Merge
Bounded - A combined stream that releases values in any order that they come
- Merge
Unbounded - A combined stream that releases values in any order that they come.
- TryBuffer
Unordered - Stream for the
try_buffered_unorderedmethod. - TryBuffered
Ordered - Stream for the
try_buffered_orderedmethod. - TryJoin
All - Future for the
try_join_allfunction.
Enums§
- Either
- Combines two different futures, streams, or sinks having the same associated types into a single type.
- Maybe
Future - A future which may not be present.
Traits§
- Buffered
Stream Ext - An extension trait for
Streams that provides a variety of convenient combinator functions. - Buffered
TryStream Ext - An extension trait for
Streams that provides a variety of convenient combinator functions. - Future
- A future represents an asynchronous computation, commonly obtained by use of
async. - Future
Ext - Extension trait for
Future. - IterExt
- Concurrency extensions for iterators of streams and futures.
- Sink
- A
Sinkis a value into which other values can be sent, asynchronously. - SinkExt
- An extension trait for
Sinks that provides a variety of convenient combinator functions. - Stream
- A stream of values produced asynchronously.
- Stream
Ext - Extension trait for
Stream. - TryFuture
- A convenience for futures that return
Resultvalues that includes a variety of adapters tailored to such futures. - TryFuture
Ext - Adapters specific to
Result-returning futures - TryStream
- A convenience for streams that return
Resultvalues that includes a variety of adapters tailored to such futures. - TryStream
Ext - Adapters specific to
Result-returning streams
Functions§
- join_
all - Creates a future which represents a collection of the outputs of the futures given.
- try_
join_ all - Creates a future which represents a collection of the outputs of the futures given.
Type Aliases§
- Merge
Deprecated