StateRules

org.json4s.scalap.StateRules

A factory for rules that apply to a particular context.

Attributes

Source:
Rules.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Concise view

Type members

Types

type Rule[+A, +X] = Rule[S, S, A, X]

Attributes

Source:
Rules.scala
type S

Attributes

Source:
Rules.scala

Value members

Concrete methods

def allOf[A, X](rules: Seq[Rule[A, X]]): S => Result[S, List[A], X]

Create a rule that succeeds if all of the given rules succeed.

Create a rule that succeeds if all of the given rules succeed.

Attributes

rules

the rules to apply in sequence.

Source:
Rules.scala
def anyOf[A, X](rules: Seq[Rule[A, X]]): Rule[S, S, List[A], X]

Create a rule that succeeds with a list of all the provided rules that succeed.

Create a rule that succeeds with a list of all the provided rules that succeed.

Attributes

rules

the rules to apply in sequence.

Source:
Rules.scala
def apply[A, X](f: S => Result[S, A, X]): Rule[S, S, A, X]

Attributes

Source:
Rules.scala
def cond(f: S => Boolean): Rule[S, S, S, Nothing]

Create a rule that identities if f(in) is true.

Create a rule that identities if f(in) is true.

Attributes

Source:
Rules.scala
def get: Rule[S, S, S, Nothing]

Attributes

Source:
Rules.scala
def nil: Rule[S, S, Nil.type, Nothing]

Attributes

Source:
Rules.scala
def none: Rule[S, S, None.type, Nothing]

Attributes

Source:
Rules.scala
def read[A](f: S => A): Rule[S, S, A, Nothing]

Attributes

Source:
Rules.scala
def repeatUntil[T, X](rule: Rule[T => T, X])(finished: T => Boolean)(initial: T): Rule[S, S, T, X]

Repeatedly apply a rule from initial value until finished condition is met.

Repeatedly apply a rule from initial value until finished condition is met.

Attributes

Source:
Rules.scala
def set(s: => S): Rule[S, S, S, Nothing]

Attributes

Source:
Rules.scala
def unit[A](a: => A): Rule[S, S, A, Nothing]

Attributes

Source:
Rules.scala
def update(f: S => S): Rule[S, S, S, Nothing]

Attributes

Source:
Rules.scala

Abstract fields

Attributes

Source:
Rules.scala