NewsubtypeValidated
monix.newtypes.NewsubtypeValidated
abstract class NewsubtypeValidated[Src] extends Newsubtype[Src]
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 @"))
}
Attributes
- Source
- NewValidated.scala
- Graph
-
- Supertypes
Members list
Type members
Inherited and Abstract types
Attributes
- Inherited from:
- NewsubtypeTrait (hidden)
- Source
- NewEncoding.scala
Value members
Inherited methods
Attributes
- Inherited from:
- NewEncoding (hidden)
- Source
- NewEncoding.scala
Attributes
- Inherited from:
- NewValidated (hidden)
- Source
- NewValidated.scala
Attributes
- Inherited from:
- NewValidated (hidden)
- Source
- NewValidated.scala
Attributes
- Inherited from:
- NewEncoding (hidden)
- Source
- NewEncoding.scala
Inherited and Abstract methods
Attributes
- Inherited from:
- NewValidated (hidden)
- Source
- NewValidated.scala
Extensions
Inherited extensions
extension (self: Type)
Attributes
- Inherited from:
- NewEncoding (hidden)
- Source
- NewEncoding.scala
Implicits
Inherited implicits
Attributes
- Inherited from:
- NewValidated (hidden)
- Source
- NewValidated.scala
Attributes
- Inherited from:
- NewEncoding (hidden)
- Source
- NewEncoding.scala
Attributes
- Inherited from:
- NewEncoding (hidden)
- Source
- NewEncoding.scala
In this article