Prism

object Prism extends LowPrioPrism
Companion
class
trait Product
trait Mirror
trait LowPrioPrism
class Object
trait Matchable
class Any

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from
Mirror

Value members

Concrete methods

def fromPartial[A, B](tryGet: PartialFunction[A, B])(inject: B => A): Prism[A, B]

Returns a new Prism instance using the specified tryGet partial function and inject function.

Returns a new Prism instance using the specified tryGet partial function and inject function.

Implicits

Implicits

implicit def identity[A]: Prism[A, A]

Returns a new Prism for the specified type.

Returns a new Prism for the specified type.

implicit def left[A, B]: Prism[Either[A, B], Left[A, B]]

Returns a new Prism from Either[A, B] to Left[A, B].

Returns a new Prism from Either[A, B] to Left[A, B].

implicit def none[A]: Prism[Option[A], None]

Returns a new Prism from Option to None.

Returns a new Prism from Option to None.

implicit def right[A, B]: Prism[Either[A, B], Right[A, B]]

Returns a new Prism from Either[A, B] to Right[A, B].

Returns a new Prism from Either[A, B] to Right[A, B].

final implicit def some[A]: Prism[Option[A], Some[A]]

Returns a new Prism from Option to Some.

Returns a new Prism from Option to Some.

Inherited implicits

final implicit def derive[S, A <: S](tag: ClassTag[A]): Prism[S, A]

Returns a new Prism for the specified supertype and subtype.

Returns a new Prism for the specified supertype and subtype.

Relies on class tags. Since the function is implicit, Prisms are available implicitly for any supertype and subtype relationships.

Inherited from
LowPrioPrism