StatusStream

com.raquo.airstream.extensions.StatusStream
final class StatusStream[In, Out](val stream: EventStream[Status[In, Out]]) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

Emit x if parent stream emits Resolved(_, x, _), do nothing otherwise

Emit x if parent stream emits Resolved(_, x, _), do nothing otherwise

Attributes

def collectOutput[Out2](pf: PartialFunction[Out, Out2]): EventStream[Out2]

Emit pf(x) if parent stream emits Resolved(_, x, _), do nothing otherwise

Emit pf(x) if parent stream emits Resolved(_, x, _), do nothing otherwise

Attributes

Emit Pending(input) if parent stream emits that, do nothing otherwise

Emit Pending(input) if parent stream emits that, do nothing otherwise

Attributes

Emit input if parent stream emits Pending(input), do nothing otherwise

Emit input if parent stream emits Pending(input), do nothing otherwise

Attributes

Emit pf(Resolved(...)) if parent stream emits Resolved(...), do nothing otherwise

Emit pf(Resolved(...)) if parent stream emits Resolved(...), do nothing otherwise

Attributes

def collectResolved[Out2](pf: PartialFunction[Resolved[In, Out], Out2]): EventStream[Out2]

Emit pf(Resolved(...)) if parent stream emits Resolved(...) and pf is defined for it, do nothing otherwise

Emit pf(Resolved(...)) if parent stream emits Resolved(...) and pf is defined for it, do nothing otherwise

Attributes

def splitStatus[A](resolved: (Resolved[In, Out], Signal[Resolved[In, Out]]) => A, pending: (Pending[In], Signal[Pending[In]]) => A): EventStream[A]

This .split-s a stream of Statuses by their type (resolved vs pending). If you want a different key, use the .splitOne operator directly.

This .split-s a stream of Statuses by their type (resolved vs pending). If you want a different key, use the .splitOne operator directly.

Value parameters

pending

(initialPending, signalOfPendingValues) => output pending is called whenever stream switches from Resolved to Pending, or when the very first event is emitted (and it's Pending, as is typical) signalOfPendingValues starts with initialPending value, and updates when the parent stream emits a new Resolved consecutively after another Resolved. This happens when the stream emits inputs faster than the outputs are resolved.

resolved

(initialResolved, signalOfResolvedValues) => output resolved is called whenever stream switches from Pending to Resolved. signalOfResolvedValues starts with initialResolved value, and updates when the parent stream emits a new Resolved consecutively after another Resolved.

Attributes

Concrete fields

val stream: EventStream[Status[In, Out]]