trait Refinement[A, B] extends AnyRef
A type-refinement, associated to a runtime-representation of a constraint.
Represents the fact that you can go from A to B provided the value of tye A abides by a given Constraint.
- Self Type
- Refinement[A, B]
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Refinement
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
- abstract type Constraint
The reified constraint associated to the refinement
Abstract Value Members
- abstract def apply(a: A): Either[String, B]
- abstract def constraint: Constraint
- abstract def from(b: B): A
- abstract def tag: ShapeTag[Constraint]
- abstract def unsafe(a: A): B
Short circuits validation.
Short circuits validation. This should only be used as last-resort when it is impossible to implement schema compilers otherwise, such as ones that create data out of thin air (random generators/default values/etc).
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final val asFunction: (A) => Either[ConstraintError, B]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- final val asThrowingFunction: (A) => B
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def imapFull[A0, B0](bijectSource: Bijection[A, A0], bijectTarget: Bijection[B, B0]): Aux[Constraint, A0, B0]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()