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
- Alphabetic
- By Inheritance
- Yield
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract val evolution: Evolution[I, O, E]
The evolution strategy that determines which stage to invoke next, depending on status.
- 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
Yieldwith each component independently transformed.Returns a new
Yieldwith 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
- abstract def outOption: Option[O]
Returns
scala.Some(out)if this is a Yield.Some, orscala.Noneif this is a Yield.None.Returns
scala.Some(out)if this is a Yield.Some, orscala.Noneif this is a Yield.None.Prefer pattern-matching on Yield.Some / Yield.None when you also need the
statusorevolution. UseoutOptionwhen you only care about whether a value was produced. - abstract val status: Status[E]
The status produced by the stage that created this
Yield.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- 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
Stageto use for re-processing
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)