Packages

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).

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

Source
IOr.scala
Linear Supertypes
Serializable, Product, Equals, BinaryOperator[Stage[I, LO, E], Stage[I, RO, E], I, Ior[LO, RO], E], Stage[I, Ior[LO, RO], E], (I) => Yield[I, Ior[LO, RO], E], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IOr
  2. Serializable
  3. Product
  4. Equals
  5. BinaryOperator
  6. Stage
  7. Function1
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new IOr(left: Stage[I, LO, E], right: Stage[I, RO, E])

    left

    the stage producing the left side of the Ior

    right

    the stage producing the right side of the Ior

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def andThen[A](g: (Yield[I, Ior[LO, RO], E]) => A): (I) => A
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  5. def apply(in: I): Yield[I, Ior[LO, RO], E]

    Applies this stage to the given input, producing a Yield.

    Applies this stage to the given input, producing a Yield.

    in

    the input value

    returns

    a Yield containing the optional output, status, and evolution

    Definition Classes
    IOrStage → Function1
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  8. def compose[A](g: (A) => I): (A) => Yield[I, Ior[LO, RO], E]
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. final def execute(in: I): Outcome[Ior[LO, RO], E]

    Executes this stage end-to-end and returns a plain Outcome.

    Executes this stage end-to-end and returns a plain Outcome.

    Internally this method:

    1. Applies the stage to in, obtaining a Yield.
    2. Disposes the Evolution carried by the Yield — since execute is a terminal operation, the continuation is not needed and the resources held by this stage must be released immediately.
    3. Wraps the result in an Outcome.Some or Outcome.None.

    Disposal failures do not prevent the result from being returned. Any non-fatal exception raised by Evolution.dispose is captured in Outcome.disposeFailure and the outcome is still produced. Fatal exceptions are not caught and will propagate.

    in

    the input value

    returns

    Outcome.Some if this stage produced an output, Outcome.None otherwise

    Definition Classes
    Stage
    Annotations
    @inline()
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. val left: Stage[I, LO, E]

    The left sub-stage.

    The left sub-stage.

    Definition Classes
    IOrBinaryOperator
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  17. def productElementNames: Iterator[String]
    Definition Classes
    Product
  18. val right: Stage[I, RO, E]

    The right sub-stage.

    The right sub-stage.

    Definition Classes
    IOrBinaryOperator
  19. def skip(): Evolution[I, Ior[LO, RO], E]

    Returns the Evolution for this stage without processing any input.

    Returns the Evolution for this stage without processing any input.

    Any stage that participates in a pipeline run but does not process the current input must call skip() instead of apply. Common triggers: an upstream stage produced no output (Yield.None), or a non-inclusive binary operation excluded this branch. The stage must return its Evolution as it would have appeared had it run, but must not perform any side effects or consume input.

    See the Lifecycle section in Stage for the full contract.

    returns

    the Evolution representing how the pipeline should continue from this stage

    Definition Classes
    IOrStage
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    Function1 → AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def ~>[_O, _E >: E](that: Stage[Ior[LO, RO], _O, _E]): Stage[I, _O, _E]

    Composes this stage with that, producing a new stage that feeds the output of this stage into that.

    Composes this stage with that, producing a new stage that feeds the output of this stage into that.

    The resulting Stage.AndThen feeds the output of this stage into that. If this stage produces an output, the statuses and evolutions of both stages are merged; if it produces no output, only the evolutions are composed and that is not invoked for the current input.

    _O

    the output type of the composed pipeline

    _E

    the combined error type (must be a supertype of E)

    that

    the stage to execute after this one

    returns

    a composed stage this ~> that

    Definition Classes
    Stage
    Annotations
    @inline()

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from BinaryOperator[Stage[I, LO, E], Stage[I, RO, E], I, Ior[LO, RO], E]

Inherited from Stage[I, Ior[LO, RO], E]

Inherited from (I) => Yield[I, Ior[LO, RO], E]

Inherited from AnyRef

Inherited from Any

Ungrouped