Validated

h8io.stages.cats.Validated
object Validated

Stage projections for cats.data.Validated.

cats.data.Validated[L, R] is a right-biased validation type where Invalid(l) holds an error value and Valid(r) holds a success value. The two projections here allow a pipeline to route values based on which side is present, producing h8io.stages.Yield.Some for the expected side and h8io.stages.Yield.None otherwise. In both cases the status is h8io.stages.Status.Success.

Example:

import h8io.stages.cats.Validated

val validStage   = Validated.Valid[String]    // Stage[cats.data.Validated[Any, String], String, Nothing]
val invalidStage = Validated.Invalid[String]  // Stage[cats.data.Validated[String, Any], String, Nothing]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Validated.type

Members list

Type members

Classlikes

object Invalid extends LeftProjection[Validated]

Extracts the Invalid (left/error) value, yielding nothing for Valid values.

Extracts the Invalid (left/error) value, yielding nothing for Valid values.

Use Validated.Invalid[T] to get a typed Projection[Validated[T, Any], T].

Attributes

Supertypes
trait Projection[Validated[Any, Any], Any]
trait StaticStage[Validated[Any, Any], Any, Nothing]
trait SAMStage[Validated[Any, Any], Any, Nothing]
trait Stagnation[Validated[Any, Any], Any, Nothing]
trait Evolution[Validated[Any, Any], Any, Nothing]
trait Stage[Validated[Any, Any], Any, Nothing]
trait Validated[Any, Any] => Yield[Validated[Any, Any], Any, Nothing]
class Object
trait Matchable
class Any
Show all
Self type
Invalid.type
object Valid extends RightProjection[Validated]

Extracts the Valid (right/success) value, yielding nothing for Invalid values.

Extracts the Valid (right/success) value, yielding nothing for Invalid values.

Use Validated.Valid[T] to get a typed Projection[Validated[Any, T], T].

Attributes

Supertypes
trait Projection[Validated[Any, Any], Any]
trait StaticStage[Validated[Any, Any], Any, Nothing]
trait SAMStage[Validated[Any, Any], Any, Nothing]
trait Stagnation[Validated[Any, Any], Any, Nothing]
trait Evolution[Validated[Any, Any], Any, Nothing]
trait Stage[Validated[Any, Any], Any, Nothing]
trait Validated[Any, Any] => Yield[Validated[Any, Any], Any, Nothing]
class Object
trait Matchable
class Any
Show all
Self type
Valid.type

Types

type Validated[+L, +R] = Validated[L, R]