h8io.stages.projections

Members list

Type members

Classlikes

object Either

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

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

Supertypes
class Object
trait Matchable
class Any
Self type
Either.type
object Tuple2

Stage projections for Scala's standard scala.Tuple2 type.

Stage projections for Scala's standard scala.Tuple2 type.

Each projection extracts one element of a pair (A, B) and always yields h8io.stages.Yield.Some with h8io.stages.Status.Success, because a tuple always has both elements.

Example:

val fstStage = Tuple2.Left[String]   // Stage[(String, Any), String, Nothing]
val sndStage = Tuple2.Right[Int]     // Stage[(Any, Int), Int, Nothing]

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Tuple2.type
object Unlift extends Projection[Option[Any], Any]

A h8io.stages.base.Projection for Option[T], extracting the contained value when present.

A h8io.stages.base.Projection for Option[T], extracting the contained value when present.

  • Some(v) → h8io.stages.Yield.Some``(v, Status.Success, this)
  • None → h8io.stages.Yield.None``(Status.Success, this)

In both cases the status is h8io.stages.Status.Success; the absence of a value is not treated as an error.

The singleton operates on Option[Any] and can be safely cast to Projection[Option[T], T] via apply[T].

Attributes

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