Status

h8io.stages.Status
See theStatus companion object
sealed trait Status[+E]

The execution status produced by a Stage.

A Status travels alongside the output (or absence of output) in a Yield and is accumulated as stages are composed. There are two possible states:

  • Status.Success — the stage completed normally and processing may continue.
  • Status.Complete — a unit of work has finished. Passed to Evolution when selecting the next continuation stage; the enclosing cycle operators (Loop, Repeat and the rest of h8io.stages.cycles in the lib module) use it to end the current cycle. When errors is empty this represents clean completion; when errors is non-empty it carries one or more accumulated errors.

Statuses form a monoid under combine, used when merging the results of composed stages: Success is the identity element and Complete accumulates errors on combination.

Type parameters

E

the error type (covariant)

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Complete[E]
object Success

Members list

Value members

Abstract methods

def combine[_E >: E](next: Status[_E]): Status[_E]

Combines this status with next, returning the more severe of the two.

Combines this status with next, returning the more severe of the two.

Success is the identity element; Complete dominates Success and two Complete values are merged by concatenating their error sequences.

Attributes

def map[_E](f: E => _E): Status[_E]

Transforms the error values contained in this status.

Transforms the error values contained in this status.

Type parameters

_E

the resulting error type

Value parameters

f

the mapping function applied to each error value

Attributes

Returns

a new Status with errors mapped by f