package misc
Type Members
- class CollectStream[A, B] extends SingleParentStream[A, B] with InternalNextErrorObserver[A]
This stream applies
fn
to the parent stream's events, and emitsx
from the resultingSome(x)
value (ifNone
, nothing is fired).This stream applies
fn
to the parent stream's events, and emitsx
from the resultingSome(x)
value (ifNone
, nothing is fired).This stream emits an error if the parent stream emits an error (Note: no filtering applied), or if
fn
throws - class DropStream[A] extends SingleParentStream[A, A] with InternalNextErrorObserver[A]
Event stream that mimics the parent event stream, except that first it skips (drops) the parent's events, for as long as
dropWhile
returns true.Event stream that mimics the parent event stream, except that first it skips (drops) the parent's events, for as long as
dropWhile
returns true. As soon as it returns false for the first time, it starts mirroring the parent stream faithfully.Note: only events are dropped, not errors.
- class FilterStream[A] extends SingleParentStream[A, A] with InternalNextErrorObserver[A]
This stream fires a subset of the events fired by its parent
This stream fires a subset of the events fired by its parent
This stream emits an error if the parent stream emits an error (Note: no filtering applied), or if
passes
throws - class MapSignal[I, O] extends SingleParentSignal[I, O]
This signal emits an error if the parent observable emits an error or if
project
throwsThis signal emits an error if the parent observable emits an error or if
project
throwsIf
recover
is defined and needs to be called, it can do the following: - Return Some(value) to make this signal emit value - Return None to make this signal ignore (swallow) this error - Not handle the error (meaning .isDefinedAt(error) must be false) to emit the original error - class MapStream[I, O] extends SingleParentStream[I, O] with InternalNextErrorObserver[I]
This stream applies a
project
function to events fired by its parent and fires the resulting valueThis stream applies a
project
function to events fired by its parent and fires the resulting valueThis stream emits an error if the parent observable emits an error or if
project
throwsIf
recover
is defined and needs to be called, it can do the following: - Return Some(value) to make this stream emit value - Return None to make this stream ignore (swallow) this error - Not handle the error (meaning .isDefinedAt(error) must be false) to emit the original errorIf
recover
throws an exception, it will be wrapped inErrorHandlingError
and propagated. - class ScanLeftSignal[A, B] extends SingleParentSignal[A, B]
Note: In folds, failure is often toxic to all subsequent events.
Note: In folds, failure is often toxic to all subsequent events. You often can not satisfactorily recover from a failure downstream because you will not have access to previous non-failed state in
fn
Therefore, make sure to handle recoverable errors infn
. - class SignalFromStream[A] extends SingleParentSignal[A, A]
- class StreamFromSignal[A] extends SingleParentStream[A, A] with InternalTryObserver[A]
- class TakeStream[A] extends SingleParentStream[A, A] with InternalNextErrorObserver[A]
Event stream that mimics the parent event stream (both events and errors) for as long as
takeWhile
returns true.Event stream that mimics the parent event stream (both events and errors) for as long as
takeWhile
returns true. As soon astakeWhile
returnsfalse
for the first time, it stops emitting anything.