NewsubtypeValidated
A validated Newsubtype.
This class is for defining newsubtypes with a builder that validates values.
Example:
type EmailAddress = EmailAddress.Type
object EmailAddress extends NewsubtypeValidated[String] {
def apply(v: String): Either[BuildFailure[Type], Type] =
if (v.contains("@"))
Right(unsafeCoerce(v))
else
Left(BuildFailure[EmailAddress]("missing @"))
}
trait NewValidated[Src]
class Newsubtype[Src]
trait NewsubtypeTrait[Src]
trait NewEncoding[Src]
class Object
trait Matchable
class Any
Type members
Inherited types
Value members
Inherited methods
Extensions
Inherited extensions
extension (self: Type)