sealed trait UnlessShutdown[+A] extends Product with Serializable
The outcome of a computation (UnlessShutdown.Outcome) unless the computation has aborted due to a shutdown (UnlessShutdown.AbortedDueToShutdown).
A copy of scala.Option. We use a separate class to document the purpose.
- A
The type of the outcome.
- Alphabetic
- By Inheritance
- UnlessShutdown
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def canEqual(that: Any): Boolean
- Definition Classes
- Equals
- abstract def flatMap[B](f: (A) => UnlessShutdown[B]): UnlessShutdown[B]
Monadically chain two outcome computations.
Monadically chain two outcome computations. Abortion due to shutdown propagates.
- abstract def foreach(f: (A) => Unit): Unit
Applies the function to the outcome if available
- abstract def map[B](f: (A) => B): UnlessShutdown[B]
Transforms the outcome using the given function.
- abstract def onShutdown[B >: A](ifShutdown: => B): B
Evaluate the argument upon abortion and otherwise return the outcome
Evaluate the argument upon abortion and otherwise return the outcome
Analogue to scala.Option.getOrElse.
- abstract def productArity: Int
- Definition Classes
- Product
- abstract def productElement(n: Int): Any
- Definition Classes
- Product
- abstract def toRight[L](aborted: => L): Either[L, A]
Convert the outcome into an scala.Right$ or scala.Left$
(aborted)
upon abortion. - abstract def traverse[F[_], B](f: (A) => F[B])(implicit F: Applicative[F]): F[UnlessShutdown[B]]
Applicative traverse for outcome computations.
Applicative traverse for outcome computations. The given function is not applied upon abortion.