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
  • IOr
  • StatusInstances
  • Validated
  • package examples
    Definition Classes
    stages
  • package operators
    Definition Classes
    stages
  • package projections
    Definition Classes
    stages
  • package std
    Definition Classes
    stages

package cats

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. final case class IOr[-I, +LO, +RO, +E](left: Stage[I, LO, E], right: Stage[I, RO, E]) extends BinaryOperator[Stage[I, LO, E], Stage[I, RO, E], I, Ior[LO, RO], E] with Product with Serializable

    A binary operator that applies two stages independently to the same input and combines their outputs into a cats.data.Ior (inclusive-or).

    A binary operator that applies two stages independently to the same input and combines their outputs into a cats.data.Ior (inclusive-or).

    All four combinations of left/right presence are handled:

    Left result

    Right result

    Output

    Yield.Some

    Yield.Some

    Ior.Both(l, r)

    Yield.Some

    Yield.None

    Ior.Left(l)

    Yield.None

    Yield.Some

    Ior.Right(r)

    Yield.None

    Yield.None

    Yield.None

    Unlike h8io.stages.operators.And (which short-circuits on the left) and h8io.stages.operators.Or (which short-circuits on the right), IOr always applies both stages, making it the inclusive variant.

    Statuses from both stages are merged with combine. The evolution pairs corresponding branches symmetrically (like h8io.stages.operators.IAnd).

    I

    the shared input type (contravariant)

    LO

    the left output type (covariant)

    RO

    the right output type (covariant)

    E

    the error type (covariant)

    left

    the stage producing the left side of the Ior

    right

    the stage producing the right side of the Ior

Value Members

  1. object IOr extends Serializable

    Companion object for IOr, containing the private evolution and projections.

  2. object StatusInstances

    Cats typeclass instances for h8io.stages.Status.

    Cats typeclass instances for h8io.stages.Status.

    Status forms a cats.Monoid with h8io.stages.Status.Success as the identity element and h8io.stages.Status.combine as the binary operation.

    Import StatusInstances.* to bring the instances into scope:

    import h8io.stages.cats.StatusInstances.*
  3. object Validated

    Stage projections for cats.data.Validated.

    Stage projections for cats.data.Validated.

    cats.data.Validated[L, R] is a right-biased validation type where Invalid(l) holds an error value and Valid(r) holds a success value. The two projections here allow a pipeline to route values based on which side is present, producing h8io.stages.Yield.Some for the expected side and h8io.stages.Yield.None otherwise. In both cases the status is h8io.stages.Status.Success.

    Example:

    import h8io.stages.cats.Validated
    
    val validStage   = Validated.Valid[String]    // Stage[cats.data.Validated[?, String], String, Nothing]
    val invalidStage = Validated.Invalid[String]  // Stage[cats.data.Validated[String, ?], String, Nothing]

Ungrouped