package projections
- Alphabetic
- Public
- Protected
Value Members
- object Either
Stage projections for Scala's standard
scala.util.Eithertype.Stage projections for Scala's standard
scala.util.Eithertype.Each projection extracts one side of an
Eitherand either passes the value downstream (h8io.stages.Yield.Some) or produces no output (h8io.stages.Yield.None) when theEitherholds the other side. In both cases the status ish8io.stages.Status.Success, so the pipeline continues.Example:
val leftStage = Either.Left[String] // Stage[scala.util.Either[String, ?], String, Nothing] val rightStage = Either.Right[Int] // Stage[scala.util.Either[?, Int], Int, Nothing]
- object Tuple2
Stage projections for Scala's standard
scala.Tuple2type.Stage projections for Scala's standard
scala.Tuple2type.Each projection extracts one element of a pair
(A, B)and always yieldsh8io.stages.Yield.Somewithh8io.stages.Status.Success, because a tuple always has both elements.Example:
val fstStage = Tuple2.Left[String] // Stage[(String, ?), String, Nothing] val sndStage = Tuple2.Right[Int] // Stage[(?, Int), Int, Nothing]
- 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 toProjection[Option[T], T]viaapply[T].