Some

h8io.stages.Yield.Some
final case class Some[-I, +O, +E](out: O, status: Status[E], evolution: Evolution[I, O, E]) extends Yield[I, O, E]

A yield carrying an output.

In a pipeline the output becomes the downstream stage's input, and the two yields are merged into one.

Type parameters

E

the error type (covariant)

I

the input type of the stages held by the evolution (contravariant)

O

the output type (covariant)

Value parameters

evolution

the continuation

out

the output value

status

the status of the run that produced this yield

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Yield[I, O, E]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def map[_I, _O, _E](mapOut: O => _O, mapStatus: Status[E] => Status[_E], mapEvolution: Evolution[I, O, E] => Evolution[_I, _O, _E]): Some[_I, _O, _E]

Transforms all three components at once. mapOut is not called on a Yield.None, which has no output to transform, but is still required so that the result type is the same for both variants.

Transforms all three components at once. mapOut is not called on a Yield.None, which has no output to transform, but is still required so that the result type is the same for both variants.

Attributes

Definition Classes
def outOption: Option[O]

The output as an Option — for when only its presence matters. Prefer matching on Yield.Some / Yield.None when the status or the evolution is needed too.

The output as an Option — for when only its presence matters. Prefer matching on Yield.Some / Yield.None when the status or the evolution is needed too.

Attributes

Inherited methods

def evolve(): Stage[I, O, E]

The stage that handles the next input: the continuation this yield's own status selects.

The stage that handles the next input: the continuation this yield's own status selects.

Going through the evolution directly is the exception, not the rule — the status a yield carries is the one its continuation must be chosen by, and this method is what pairs them.

Attributes

Inherited from:
Yield
def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product