Packages

  • package root
    Definition Classes
    root
  • package h8io
    Definition Classes
    root
  • package stages
    Definition Classes
    h8io
  • package base

    Type aliases used throughout the lib module for describing stage transformations.

    Type aliases used throughout the lib module for describing stage transformations.

    // A decorator wraps a Stage[I, O, E] and returns another Stage[I, O, E]:
    val myDecorator: Decorator[String, Int, Nothing] = CompleteIfNone(_)
    
    // An alteration converts any Stage to a (possibly different) Stage:
    val myAlt: Alteration[Stage[String, Int, Nothing], Stage[String, Option[Int], Nothing]] = Lift(_)
    Definition Classes
    stages
  • package cats
    Definition Classes
    stages
  • package examples
    Definition Classes
    stages
  • package operators
    Definition Classes
    stages
  • package projections
    Definition Classes
    stages
  • Either
  • Tuple2
  • Unlift
  • package std
    Definition Classes
    stages
p

h8io.stages

projections

package projections

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Value Members

  1. 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, ?], String, Nothing]
    val rightStage = Either.Right[Int]     // Stage[scala.util.Either[?, Int], Int, Nothing]
  2. 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, ?), String, Nothing]
    val sndStage = Tuple2.Right[Int]     // Stage[(?, Int), Int, Nothing]
  3. 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)
    • Noneh8io.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].

Ungrouped