StatusObservable

com.raquo.airstream.extensions.StatusObservable
final class StatusObservable[In, Out, Self <: (Observable)](val observable: BaseObservable[Self, Status[In, Out]]) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def foldStatus[B](resolved: Resolved[In, Out] => B, pending: Pending[In] => B): Self[B]

Map Resolved(...) with resolved, and Pending(x) with pending, to a common type

Map Resolved(...) with resolved, and Pending(x) with pending, to a common type

Attributes

def mapInput[In2](project: In => In2): Self[Status[In2, Out]]

Map the input value in both Pending and Resolved

Map the input value in both Pending and Resolved

Attributes

def mapOutput[Out2](project: Out => Out2): Self[Status[In, Out2]]

Map the output value in Resolved

Map the output value in Resolved

Attributes

def mapPending[B](project: Pending[In] => B): Self[Either[B, Resolved[In, Out]]]

Map Pending(x) to Left(project(Pending(x))), and Resolved(...) to Right(Resolved(...))

Map Pending(x) to Left(project(Pending(x))), and Resolved(...) to Right(Resolved(...))

Attributes

def mapResolved[B](project: Resolved[In, Out] => B): Self[Either[Pending[In], B]]

Map Resolved(...) to Right(project(Resolved(...))), and Pending(y) to Left(Pending(y))

Map Resolved(...) to Right(project(Resolved(...))), and Pending(y) to Left(Pending(y))

Attributes

Concrete fields

val observable: BaseObservable[Self, Status[In, Out]]