eu.timepit.refined.api
Provides functions to create values of the refined type FTP from values of the base type T. It is intended to simplify the definition of a refined type's companion object.
FTP
T
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)
Provides functions to create values of the refined type
FTP
from values of the base typeT
. It is intended to simplify the definition of a refined type's companion object.Example: