StreamExtension<T> extension
- on
-
- Stream<
T>
- Stream<
Methods
-
toResult(
{bool test(Object error)?}) → Stream< Result< T> > -
Encapsulates a
value
emitted in a Result, if successful then thevalue
is encapsulated as asuccess
in Result using the EventSink.add, iferror
thentest
is called with theerror value
, iftest
istrue
, theerror
and the StackTrace are encapsulated as afailure
in Result using EventSink.add, otherwise, iftest
isfalse
, then theerror
and StackTrace are added using EventSink.addError.