Valid

endpoints4s.Valid
case class Valid[+A](value: A) extends Validated[A]

A valid value of type A

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Validated[A]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def flatMap[B](f: A => Validated[B]): Validated[B]

Subsequently validates this valid value. An invalid value is returned as it is.

Subsequently validates this valid value. An invalid value is returned as it is.

Attributes

Inherited from:
Validated
def fold[B](valid: A => B, invalid: Seq[String] => B): B

Transforms this validated value into a value of type B

Transforms this validated value into a value of type B

Attributes

Inherited from:
Validated
def map[B](f: A => B): Validated[B]

Transforms a valid value of type A into a valid value of type B. An invalid value is returned as it is.

Transforms a valid value of type A into a valid value of type B. An invalid value is returned as it is.

Attributes

Inherited from:
Validated
def mapErrors(f: Seq[String] => Seq[String]): Validated[A]

Transforms the error list of an invalid value. A valid value is returned as it is.

Transforms the error list of an invalid value. A valid value is returned as it is.

Attributes

Inherited from:
Validated
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def toEither: Either[Seq[String], A]

Transforms this Validated[A] value into an Either[Seq[String], A] value.

Transforms this Validated[A] value into an Either[Seq[String], A] value.

Attributes

Inherited from:
Validated
def zip[A0 >: A, B](that: Validated[B])(implicit tupler: Tupler[A0, B]): Validated[Out]

Tuples together two validated values and tries to return a flat tuple instead of nested tuples. Also strips out Unit values in the tuples.

Tuples together two validated values and tries to return a flat tuple instead of nested tuples. Also strips out Unit values in the tuples.

If this and that are both invalid values, this operation returns an Invalid value containing both this error messages and that error messages.

Attributes

See also
Inherited from:
Validated