type Stream<e, a> = recursive either { .end Try<e, !>, .item choice { .cancel => Try<e, !>, .get => (a) self, }, }
A pull-based sequence of values of type a whose completion can fail with
an error of type e.
Cases:
.endmeans the stream is exhausted. Its payload is.ok!on normal completion, or.errif the producer failed..itemoffers one item. The consumer must either call.getto receive it and continue, or.cancelto stop early.