toSet method

  1. @override
AsObservableFuture<Set<CommandResult<TResult>>> toSet ()

Collects the data of this stream in a Set.

The returned set is the same type as returned by new Set<T>(). If another type of set is needed, either use forEach to add each element to the set, or use toList().then((list) => new SomeOtherSet.from(list)) to create the set.

Implementation

@override
AsObservableFuture<Set<T>> toSet() =>
    new AsObservableFuture<Set<T>>(_stream.toSet());