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
Source
Fallback.scala
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

Attributes

Source
Fallback.scala
def map[C](f: A => C): Fallback[C, B]

Attributes

Source
Fallback.scala
def mapLeft[C](f: A => C): Fallback[C, B]

Attributes

Source
Fallback.scala
def mapRight[C](f: B => C): Fallback[A, C]

Attributes

Source
Fallback.scala
def simplify: Fallback[A, B]

Deletes the right part of Fallback.Both instances.

Deletes the right part of Fallback.Both instances.

Attributes

Source
Fallback.scala
def swap: Fallback[B, A]

Attributes

Source
Fallback.scala
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

Source
Fallback.scala