EitherObservable

com.raquo.airstream.extensions.EitherObservable
final class EitherObservable[A, B, Self <: (Observable)](val observable: BaseObservable[Self, Either[A, B]]) extends AnyVal

See also: EitherStream

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def foldEither[C](left: A => C, right: B => C): Self[C]

Maps the values in Left(y) and Right(x)

Maps the values in Left(y) and Right(x)

Attributes

def mapLeft[AA](project: A => AA): Self[Either[AA, B]]

Maps the value in Left(x)

Maps the value in Left(x)

Attributes

def mapLeftToOption: Self[Option[A]]

Maps Right(_) to None, Left(x) to Some(x)

Maps Right(_) to None, Left(x) to Some(x)

Attributes

def mapRight[BB](project: B => BB): Self[Either[A, BB]]

Maps the value in Right(x)

Maps the value in Right(x)

Attributes

def mapToOption: Self[Option[B]]

Maps Right(x) to Some(x), Left(_) to None

Maps Right(x) to Some(x), Left(_) to None

Attributes

def swap: Self[Either[B, A]]

Maps Right(x) to Left(x), and Left(y) to Right(y)

Maps Right(x) to Left(x), and Left(y) to Right(y)

Attributes

Concrete fields

val observable: BaseObservable[Self, Either[A, B]]