heim_common::prelude::futures

Module stream

Source
Expand description

Asynchronous streams.

Modules§

Structs§

Enums§

Traits§

  • A stream which tracks whether or not the underlying stream should no longer be polled.
  • A stream of values produced asynchronously.
  • An extension trait for Streams that provides a variety of convenient combinator functions.
  • A convenience for streams that return Result values that includes a variety of adapters tailored to such futures.
  • Adapters specific to Result-returning streams

Functions§

  • Creates a new Abortable stream and an AbortHandle which can be used to stop it.
  • Creates a stream which contains no elements.
  • Converts an Iterator into a Stream which is always ready to yield the next value.
  • Creates a stream of a single element.
  • Creates a stream which never returns any elements.
  • Creates a new stream wrapping a function returning Poll<Option<T>>.
  • Creates a new stream that always immediately returns Poll::Ready when awaiting it.
  • Create a stream which produces the same item repeatedly.
  • Creates a new stream that repeats elements of type A endlessly by applying the provided closure, the repeater, F: FnMut() -> A.
  • This function will attempt to pull items from both streams. Each stream will be polled in a round-robin fashion, and whenever a stream is ready to yield an item that item is yielded.
  • Convert a list of streams into a Stream of results from the streams.
  • This function will attempt to pull items from both streams. You provide a closure to tell SelectWithStrategy which stream to poll. The closure can store state on SelectWithStrategy to which it will receive a &mut on every invocation. This allows basing the strategy on prior choices.
  • Creates a TryStream from a seed and a closure returning a TryFuture.
  • Creates a Stream from a seed and a closure returning a Future.

Type Aliases§