StreamIterator<T> class

An Iterator like interface for the values of a Stream.

An Iterator like interface for the values of a Stream.

This wraps a Stream and a subscription on the stream. It listens on the stream, and completes the future returned by moveNext when the next value becomes available.

Constructors

StreamIterator ( Stream<T> stream )
Create a StreamIterator on stream.

Instance Properties

current T
read-only

Instance Methods

moveNext ( ) → Future<bool>
Wait for the next stream value to be available.
cancel ( ) → Future
Cancels the stream iterator (and the underlying stream subscription) early.