single method

Observable<T> single()

Emits the single element of this Observable, or emits TooFewError if there was no element, or emits TooManyError if there was more than 1 element.

Implementation

Observable<T> single() => singleOrElse(
  tooFew: throwFunction0(TooFewError()),
  tooMany: throwFunction0(TooManyError()),
);