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
  • package std
    Definition Classes
    stages
  • Evolution
  • Outcome
  • Stage
  • Status
  • Yield

sealed trait Yield[-I, +O, +E] extends AnyRef

The immediate result returned by a Stage when applied to an input value.

A Yield carries three pieces of information:

  • An optional output value (O), present only in Yield.Some.
  • A Status representing the outcome of this stage invocation.
  • An Evolution that decides which stage to use when re-processing based on the status.

The type parameters follow the same variance rules as Stage: contravariant in I (the input consumed by the continuation stages stored in the evolution) and covariant in O and E.

I

the input type consumed by the Evolution stages (contravariant)

O

the output type (covariant)

E

the error type (covariant)

Source
Yield.scala
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Yield
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract val evolution: Evolution[I, O, E]

    The evolution strategy that determines which stage to invoke next, depending on status.

  2. abstract def map[_I, _O, _E](mapOut: (O) => _O, mapStatus: (Status[E]) => Status[_E], mapEvolution: (Evolution[I, O, E]) => Evolution[_I, _O, _E]): Yield[_I, _O, _E]

    Returns a new Yield with each component independently transformed.

    Returns a new Yield with each component independently transformed.

    _I

    the new input type for the evolution

    _O

    the new output type

    _E

    the new error type

    mapOut

    maps the output value (only applied in Yield.Some)

    mapStatus

    maps the status

    mapEvolution

    maps the evolution

    returns

    a transformed Yield

  3. abstract def outOption: Option[O]

    Returns scala.Some(out) if this is a Yield.Some, or scala.None if this is a Yield.None.

    Returns scala.Some(out) if this is a Yield.Some, or scala.None if this is a Yield.None.

    Prefer pattern-matching on Yield.Some / Yield.None when you also need the status or evolution. Use outOption when you only care about whether a value was produced.

  4. abstract val status: Status[E]

    The status produced by the stage that created this Yield.

Concrete 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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def evolve(): Stage[I, O, E]

    Returns the next Stage to invoke when the pipeline is ready to re-process.

    Returns the next Stage to invoke when the pipeline is ready to re-process.

    The stage returned depends on the current status: Status.Success yields the continuation for the normal path, Status.Complete for the finished path.

    returns

    the next Stage to use for re-processing

  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  15. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

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 AnyRef

Inherited from Any

Ungrouped