TryObservable

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

See also: OptionStream

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def foldTry[B](failure: Throwable => B, success: A => B): Self[B]

Maps the values in Success(x) and Failure(y) to a common type

Maps the values in Success(x) and Failure(y) to a common type

Attributes

def mapFailure(project: Throwable => Throwable): Self[Try[A]]

Maps the value in Failure(x)

Maps the value in Failure(x)

Attributes

def mapSuccess[B](project: A => B): Self[Try[B]]

Maps the value in Success(x)

Maps the value in Success(x)

Attributes

def mapToEither: Self[Either[Throwable, A]]

Convert the Try to Either

Convert the Try to Either

Attributes

def mapToEither[L](left: Throwable => L): Self[Either[L, A]]

Convert the Try to Either and map the value in Left(x)

Convert the Try to Either and map the value in Left(x)

Attributes

def recoverFailure[AA >: A](f: Throwable => AA): Self[AA]

Merge Try[A] into Try[AA >: A] by mapping the value in Failure(y)

Merge Try[A] into Try[AA >: A] by mapping the value in Failure(y)

Attributes

def throwFailure: Self[A]

Unwrap Try to "undo" recoverToTry – Encode Failure(err) as observable errors, and Success(v) as events

Unwrap Try to "undo" recoverToTry – Encode Failure(err) as observable errors, and Success(v) as events

Attributes

Concrete fields

val observable: BaseObservable[Self, Try[A]]