quiver.async library
Classes
- CountdownTimer
- A simple countdown timer that fires events in regular increments until a duration has passed. [...]
-
FutureStream<
T> -
A Stream that will emit the same values as the stream returned by
future
oncefuture
completes. [...] - Metronome
- A stream of DateTime events at intervals centered on anchor. [...]
-
StreamBuffer<
T> -
Allow orderly reading of elements from a datastream, such as Socket, which
might not receive
List<int>
bytes regular chunks. [...] -
StreamRouter<
T> - Splits a Stream of events into multiple Streams based on a set of predicates. [...]
Functions
-
byteStreamToString(
Stream< List< stream, {Encoding encoding: utf8}) → Future<int> >String> - Converts a Stream of byte lists to a String.
-
collect<
T> (Iterable< Future< futures) → Stream<T> >T> -
Returns a stream of completion events for the input
futures
. [...] -
concat<
T> (Iterable< Stream< streams) → Stream<T> >T> - Returns the concatentation of the input streams. [...]
-
doWhileAsync<
T> (Iterable< T> iterable, AsyncAction<bool, T> action) → Future<bool> -
Calls
action
for each item initerable
in turn, waiting for the Future returned by action to complete. [...]@Deprecated('Use Future.doWhile from dart:async. Will be removed in 3.0.0.') -
enumerate<
T> (Stream< T> stream) → Stream<IndexedValue< T> > -
Returns a Stream of IndexedValues where the nth value holds the nth
element of
stream
and its index. -
forEachAsync<
T> (Iterable< T> iterable, AsyncAction<Null, T> action, {int maxTasks: 1}) → Future<Null> -
Schedules calls to
action
for each element initerable
. No more thanmaxTasks
calls toaction
will be pending at once. [...]@Deprecated('Use Future.forEach or package:pool. Will be removed in 3.0.0.') -
reduceAsync<
S, T> (Iterable< T> iterable, S initialValue, AsyncCombiner<S, T> combine) → Future<S> -
Reduces a collection to a single value by iteratively combining elements of
the collection using the provided
combine
function. Similar to Iterable.reduce, except thatcombine
is an async function that returns a Future. [...]@Deprecated('Use Future.doWhile from dart:async. Will be removed in 3.0.0.')
Typedefs
-
AsyncAction<
T, E> (E e) → Future< T> - An asynchronous callback that returns a value.
-
AsyncCombiner<
T, E> (T previous, E e) → Future< T> -
An asynchronous funcuntion that combines an element
e
with a previous valueprevious
.
Exceptions / Errors
- UnderflowError
- Underflow errors happen when the socket feeding a buffer is finished while there are still blocked readers. Each reader will complete with this error.