package api
- Alphabetic
- Public
- All
Type Members
- final case class Failed[A](detail: A) extends Result[A] with Product with Serializable
- case class Inference[P, C](isValid: Boolean, show: String) extends Product with Serializable
Evidence that states if the conclusion
Ccan be inferred from the premisePor not.Evidence that states if the conclusion
Ccan be inferred from the premisePor not.This type class is used to implement refinement subtyping. If a valid
Inference[P, C]exists, the typeF[T, P]is considered a subtype ofF[T, C]. - trait LowPriorityMaxInstances extends AnyRef
- trait LowPriorityMinInstances extends AnyRef
- trait Max[T] extends AnyRef
Type class defining the maximum value of a given type
- trait MaxInstances extends LowPriorityMaxInstances
- trait Min[T] extends AnyRef
Type class defining the minimum value of a given type
- trait MinInstances extends LowPriorityMinInstances
- final case class Passed[A](detail: A) extends Result[A] with Product with Serializable
- trait RefType[F[_, _]] extends Serializable
Type class that allows
Fto be used as carrier type of a refinement.Type class that allows
Fto be used as carrier type of a refinement. The first type parameter ofFis the base type that is being refined by its second type parameter which is the type-level predicate that denotes the refinement. Consequently,F[T, P]is a phantom type that only contains a value of typeT.The library provides instances of
RefTypefor- the
Refinedvalue class - and
shapeless.tag.@@which is a subtype of its first parameter (i.e.(T @@ P) <: T)
- the
- final class Refined[T, P] extends AnyVal with Serializable
Wraps a value of type
Tthat satisfies the predicateP. - trait RefinedType[FTP] extends Serializable
Type class that combines
RefTypeandValidateinstances for a refined typeFTP. - class RefinedTypeOps[FTP, T] extends Serializable
Provides functions to create values of the refined type
FTPfrom values of the base typeT.Provides functions to create values of the refined type
FTPfrom values of the base typeT. It is intended to simplify the definition of a refined type's companion object.Example:
scala> import eu.timepit.refined.api.{ Refined, RefinedTypeOps } | import eu.timepit.refined.numeric.Positive scala> type PosInt = Int Refined Positive scala> object PosInt extends RefinedTypeOps[PosInt, Int] scala> PosInt(1) res0: PosInt = 1 scala> PosInt.from(2) res1: Either[String, PosInt] = Right(2)
- sealed abstract class Result[A] extends Product with Serializable
- trait Validate[T, P] extends Serializable
Type class for validating values of type
Taccording to a type-level predicateP.Type class for validating values of type
Taccording to a type-level predicateP. The semantics ofPare defined by the instance(s) of this type class forP.
Value Members
- object Inference extends Serializable
- object Max extends MaxInstances
- object Min extends MinInstances
- object RefType extends Serializable
- object Refined extends Serializable
- object RefinedType extends Serializable
- object RefinedTypeOps extends Serializable
- object Result extends Serializable
- object Validate extends Serializable