Fallback

zio.schema.Fallback
See theFallback companion object
sealed trait Fallback[+A, +B]

Fallback represents an enriched Either type that can contain both a left and a right value. The left value represents the default value, that fallbacks to the right value when it is not found.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Both[A, B]
class Left[A, B]
class Right[A, B]
Self type
Fallback[A, B]

Members list

Value members

Concrete methods

def fold[C](fa: A => C, fb: B => C): C
def map[C](f: A => C): Fallback[C, B]
def mapLeft[C](f: A => C): Fallback[C, B]
def mapRight[C](f: B => C): Fallback[A, C]
def simplify: Fallback[A, B]

Deletes the right part of Fallback.Both instances.

Deletes the right part of Fallback.Both instances.

Attributes

def swap: Fallback[B, A]
def toEither: Either[A, B]

Tranform a Fallback into an Either, using the left value for Fallback.Both.

Tranform a Fallback into an Either, using the left value for Fallback.Both.

Attributes