RuleOps

fields.RuleOps
See theRuleOps companion object
abstract class RuleOps[F[_], V[_], E](implicit val F: Effect[F], val V: Validated[V])

Attributes

Companion
object
Source
RuleOps.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class SyncRule[V, E]
class FailFastLikeSyncRule[V, E]

Members list

Type members

Types

type R = RuleK[F, V, E]

Attributes

Source
RuleOps.scala

Value members

Abstract methods

def and(ra: => R, rb: => R): R

Combines two R's using logical AND. Short-circuits if Validated.strategy is fields.typeclass.FailFastStrategy

Combines two R's using logical AND. Short-circuits if Validated.strategy is fields.typeclass.FailFastStrategy

Attributes

Source
RuleOps.scala

Concrete methods

def andAll(rules: List[R]): R

Combines all rules using AND

Combines all rules using AND

Attributes

Source
RuleOps.scala
def apply(effect: F[V[E]]): R

Attributes

Source
RuleOps.scala
def assert(e: => E)(test: => Boolean): R

Asserts that if test pass else returns provided E

Asserts that if test pass else returns provided E

Attributes

Source
RuleOps.scala
def assertF(e: => E)(test: => F[Boolean]): R

Asserts that if test pass else returns provided E

Asserts that if test pass else returns provided E

Attributes

Source
RuleOps.scala
def combine(rules: List[R]): R

Combines all rules using AND

Combines all rules using AND

Attributes

Source
RuleOps.scala
def defer(rule: => R): R

Defers Rule

Defers Rule

Attributes

Source
RuleOps.scala
def effect(effect: => F[V[E]]): R

Lazily converts an F[V[E]] to a Rule[F, VR, E]

Lazily converts an F[V[E]] to a Rule[F, VR, E]

Attributes

Source
RuleOps.scala
def ensure(v: => V[E])(test: => Boolean): R

Ensures that if test pass else returns provided V[E]

Ensures that if test pass else returns provided V[E]

Attributes

Source
RuleOps.scala
def ensureF(v: => V[E])(test: => F[Boolean]): R

Ensures that if test pass else returns provided V[E]

Ensures that if test pass else returns provided V[E]

Attributes

Source
RuleOps.scala
def flatten(rule: => F[R]): R

Flattens Effect with Rule

Flattens Effect with Rule

Attributes

Source
RuleOps.scala
def invalid(error: => E): R

Converts E to a R

Converts E to a R

Attributes

Source
RuleOps.scala
def modify(rule: R)(f: (V[E]) => V[E]): R

Modifies rule Validated value using f

Modifies rule Validated value using f

Attributes

Source
RuleOps.scala
def modifyM(rule: R)(f: (V[E]) => R): R

Modifies rule Validated value using f

Modifies rule Validated value using f

Attributes

Source
RuleOps.scala
def or(ra: => R, rb: => R): R

Combines two R's using logical OR, evaluating left-to-right and short-circuiting if the first rule is valid.

Combines two R's using logical OR, evaluating left-to-right and short-circuiting if the first rule is valid.

Attributes

Source
RuleOps.scala
def orAll(rules: List[R]): R

Combines all rules using OR

Combines all rules using OR

Attributes

Source
RuleOps.scala
def pure(validated: => V[E]): R

Lazily converts an V[E] to Rule[F, VR, E]

Lazily converts an V[E] to Rule[F, VR, E]

Attributes

Source
RuleOps.scala
def unwrap(rule: R): F[V[E]]

Unwraps rule from tagged type

Unwraps rule from tagged type

Attributes

Source
RuleOps.scala
def when(test: => Boolean)(rule: => R): R

Applies rule only when test pass

Applies rule only when test pass

Attributes

Source
RuleOps.scala
def whenF(test: => F[Boolean])(rule: => R): R

Applies rule only when test pass

Applies rule only when test pass

Attributes

Source
RuleOps.scala
def wrap(effect: F[V[E]]): R

Wraps rule into tagged type

Wraps rule into tagged type

Attributes

Source
RuleOps.scala

Concrete fields

val valid: R

Returns always valid R

Returns always valid R

Attributes

Source
RuleOps.scala

Implicits

Implicits

implicit val F: Effect[F]

Attributes

Source
RuleOps.scala
implicit val V: Validated[V]

Attributes

Source
RuleOps.scala