Decision

Companion:
class
trait Sum
trait Mirror
class Object
trait Matchable
class Any

Type members

Classlikes

final case class Accepted[E, T](events: Type[E], result: T) extends Decision[Nothing, E, T]
final case class InDecisive[T](result: T) extends Decision[Nothing, Nothing, T]
final case class Rejected[R](reasons: Type[R]) extends Decision[R, Nothing, Nothing]

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror

The name of the type

The name of the type

Inherited from:
Mirror

Value members

Inherited methods

def accept[E](ev: E, evs: E*): Decision[Nothing, E, Unit]

Constructs a program that decides to accept a sequence of events

Constructs a program that decides to accept a sequence of events

Inherited from:
DecisionConstructors
def acceptReturn[E, T](t: T)(ev: E, evs: E*): Decision[Nothing, E, T]

Constructs a program that decides to accept a sequence of events and also returns an output

Constructs a program that decides to accept a sequence of events and also returns an output

Inherited from:
DecisionConstructors
@targetName("acceptWhenEitherNec")
def acceptWhen[R, E](eit: EitherNec[R, E]): Decision[R, E, Unit]

Constructs a program that decides to accept an optional single event or reject otherwise

Constructs a program that decides to accept an optional single event or reject otherwise

Inherited from:
DecisionConstructors
def acceptWhen[R, E](eit: Either[R, E]): Decision[R, E, Unit]

Constructs a program that decides to accept an optional single event or reject otherwise

Constructs a program that decides to accept an optional single event or reject otherwise

Inherited from:
DecisionConstructors
def acceptWhen[R, E](ev: Option[E])(orElse: R, other: R*): Decision[R, E, Unit]

Constructs a program that decides to accept an optional single event or reject otherwise

Constructs a program that decides to accept an optional single event or reject otherwise

Inherited from:
DecisionConstructors
def acceptWhen[E](ev: Option[E]): Decision[Nothing, E, Unit]

Constructs a program that decides to accept an optional single event or do nothing

Constructs a program that decides to accept an optional single event or do nothing

Inherited from:
DecisionConstructors
def acceptWhen[E](predicate: => Boolean)(ev: E, evs: E*): Decision[Nothing, E, Unit]

Constructs a program that decides to accept a sequence of events or do nothing based on a boolean predicate

Constructs a program that decides to accept a sequence of events or do nothing based on a boolean predicate

Inherited from:
DecisionConstructors
def apply[T](t: T): Decision[Nothing, Nothing, T]

Constructs a program that outputs a pure value

Constructs a program that outputs a pure value

Inherited from:
DecisionConstructors
def fromEither[R, T](eit: Either[R, T]): Decision[R, Nothing, T]

Constructs a program that either outputs a value or rejects

Constructs a program that either outputs a value or rejects

Inherited from:
DecisionConstructors
def fromEitherNec[R, T](eit: EitherNec[R, T]): Decision[R, Nothing, T]

Constructs a program that either outputs a value or rejects

Constructs a program that either outputs a value or rejects

You can also use .toDecision syntax for more convenience.

Inherited from:
DecisionConstructors
def fromOption[R, T](opt: Option[T], orElse: R, other: R*): Decision[R, Nothing, T]

Constructs a program from an optional value, that outputs value if exists or rejects otherwise

Constructs a program from an optional value, that outputs value if exists or rejects otherwise

You can also use .toDecision syntax for more convenience

Inherited from:
DecisionConstructors
def pure[T](t: T): Decision[Nothing, Nothing, T]

Constructs a program that outputs a pure value

Constructs a program that outputs a pure value

Inherited from:
DecisionConstructors
def reject[R, E](reason: R, otherReasons: R*): Decision[R, E, Nothing]

Constructs a program that decides to reject with a sequence of reasons

Constructs a program that decides to reject with a sequence of reasons

Inherited from:
DecisionConstructors
def rejectWhen[R](ev: Option[R]): Decision[R, Nothing, Unit]

Constructs a program that decides to reject with an optional single reason or do nothing otherwise

Constructs a program that decides to reject with an optional single reason or do nothing otherwise

Inherited from:
DecisionConstructors
def rejectWhen[R](predicate: => Boolean)(ev: R, evs: R*): Decision[R, Nothing, Unit]

Constructs a program that decides to reject with a sequence of reasons if a predicate satisfies

Constructs a program that decides to reject with a sequence of reasons if a predicate satisfies

Inherited from:
DecisionConstructors
def unit: Decision[Nothing, Nothing, Unit]

Constructs a program that outputs a trivial output

Constructs a program that outputs a trivial output

Inherited from:
DecisionConstructors
def validate[R, T](validation: ValidatedNec[R, T]): Decision[R, Nothing, T]

Constructs a program that uses a validation to decide whether to output a value or reject with error(s)

Constructs a program that uses a validation to decide whether to output a value or reject with error(s)

You can also use .toDecision syntax for more convenience

Inherited from:
DecisionConstructors

Givens

Inherited givens

given given_Eq_Decision[R, E, T]: Eq[Decision[R, E, T]]
Inherited from:
DecisionCatsInstances0
given given_Traverse_D[R, E]: Traverse[D[R, E]]
Inherited from:
DecisionCatsInstances1