implicit final class RuleOps[F[_], V[_], E] extends AnyVal
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- RuleOps
- AnyVal
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def effect: F[V[E]]
Alias for unwrap
- def flatMap(f: (V[E]) => Rule[F, V, E])(implicit F: Effect[F], V: Validated[V]): Rule[F, V, E]
Combines
ruleand result of runningfonruleusing Rule.and.Combines
ruleand result of runningfonruleusing Rule.and. This is tricky syntax for usage with for-comprehension yield should always return valid Validated if you want this to work correctly.scala> import jap.fields._ scala> import jap.fields.DefaultAccumulateVM._ scala> val intF = Field(4) val intF: jap.fields.Field[Int] = root:4 scala> for { | _ <- intF > 4 | _ <- intF < 4 | _ <- intF !== 4 | } yield V.valid val res0: jap.fields.Rule[[A] =>> A, jap.fields.typeclass.Validated.Accumulate, jap.fields.ValidationError ] = Invalid(List(root -> should be greater than 4, root -> should be less than 4, root -> should not be equal to 4))
- def fold[B](onInvalid: (V[E]) => B, onValid: => B)(implicit F: Effect[F], V: Validated[V]): F[B]
See Rule.fold
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def map(f: (V[E]) => V[E])(implicit F: Effect[F], V: Validated[V]): Rule[F, V, E]
Combines
ruleand result of runningfonruleusing Rule.and. - def toString(): String
- Definition Classes
- Any
- def unwrap: F[V[E]]
Unwraps
ruleto its actual type