h8io.stages.projections
Members list
Type members
Classlikes
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 Objecttrait Matchableclass Any
- Self type
-
Either.type
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 Objecttrait Matchableclass Any
- Self type
-
Tuple2.type
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
-
class Objecttrait Matchableclass AnyShow all
- Self type
-
Unlift.type