PartialEquivalence

zio.prelude.PartialEquivalence
See thePartialEquivalence companion object
trait PartialEquivalence[A, B, +E1, +E2]

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Equivalence[A, B]
Self type
PartialEquivalence[A, B, E1, E2]

Members list

Value members

Abstract methods

def fromPartial: B => Either[E2, A]
def toPartial: A => Either[E1, B]

Concrete methods

def >>>[C, E3 >: E1, E4 >: E2](that: PartialEquivalence[B, C, E3, E4]): PartialEquivalence[A, C, E3, E4]
def andThen[C, E3 >: E1, E4 >: E2](that: PartialEquivalence[B, C, E3, E4]): PartialEquivalence[A, C, E3, E4]
def canonicalLeft(a: A): Option[A]
def canonicalLeftOrError[E](a: A)(implicit ev1: E1 <:< E, ev2: E2 <:< E): Either[E, A]
def canonicalRight(b: B): Option[B]
def canonicalRightOrError[E](b: B)(implicit ev1: E1 <:< E, ev2: E2 <:< E): Either[E, B]
def compose[C, E3 >: E1, E4 >: E2](that: PartialEquivalence[C, A, E3, E4]): PartialEquivalence[C, B, E3, E4]
def flip: PartialEquivalence[B, A, E2, E1]