Either

h8io.stages.projections.Either
object Either

Stage projections for Scala's standard scala.util.Either type.

Each projection extracts one side of an Either and either passes the value downstream (h8io.stages.Yield.Some) or produces no output (h8io.stages.Yield.None) when the Either holds the other side. In both cases the status is h8io.stages.Status.Success, so the pipeline continues.

Example:

val leftStage  = Either.Left[String]   // Stage[scala.util.Either[String, Any], String, Nothing]
val rightStage = Either.Right[Int]     // Stage[scala.util.Either[Any, Int], Int, Nothing]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Either.type

Members list

Type members

Classlikes

object Left extends LeftProjection[Either]

Extracts the left value of an Either[A, B], producing no output for Right values.

Extracts the left value of an Either[A, B], producing no output for Right values.

Use Either.Left[T] to get a typed Projection[scala.util.Either[T, Any], T].

Attributes

Supertypes
trait LeftProjection[Either]
trait Projection[Either[Any, Any], Any]
trait StaticStage[Either[Any, Any], Any, Nothing]
trait SAMStage[Either[Any, Any], Any, Nothing]
trait Stagnation[Either[Any, Any], Any, Nothing]
trait Evolution[Either[Any, Any], Any, Nothing]
trait Stage[Either[Any, Any], Any, Nothing]
trait Either[Any, Any] => Yield[Either[Any, Any], Any, Nothing]
class Object
trait Matchable
class Any
Show all
Self type
Left.type
object Right extends RightProjection[Either]

Extracts the right value of an Either[A, B], producing no output for Left values.

Extracts the right value of an Either[A, B], producing no output for Left values.

Use Either.Right[T] to get a typed Projection[scala.util.Either[Any, T], T].

Attributes

Supertypes
trait RightProjection[Either]
trait Projection[Either[Any, Any], Any]
trait StaticStage[Either[Any, Any], Any, Nothing]
trait SAMStage[Either[Any, Any], Any, Nothing]
trait Stagnation[Either[Any, Any], Any, Nothing]
trait Evolution[Either[Any, Any], Any, Nothing]
trait Stage[Either[Any, Any], Any, Nothing]
trait Either[Any, Any] => Yield[Either[Any, Any], Any, Nothing]
class Object
trait Matchable
class Any
Show all
Self type
Right.type