Prism

vulcan.Prism
See thePrism companion class
object Prism

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Prism.type

Members list

Value members

Concrete methods

final def apply[S, A](implicit prism: Prism[S, A]): Prism[S, A]

Returns the Prism for the specified types.

Returns the Prism for the specified types.

Attributes

final def instance[S, A](getOption: S => Option[A])(reverseGet: A => S): Prism[S, A]

Returns a new Prism instance using the specified getOption and reverseGet functions.

Returns a new Prism instance using the specified getOption and reverseGet functions.

Attributes

final def partial[S, A](get: PartialFunction[S, A])(reverseGet: A => S): Prism[S, A]

Returns a new Prism instance using the specified get partial function and reverseGet function.

Returns a new Prism instance using the specified get partial function and reverseGet function.

Attributes

Implicits

Implicits

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

Returns a new Prism for the specified type.

Returns a new Prism for the specified type.

Attributes

final 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].

Attributes

final implicit def none[A]: Prism[Option[A], None.type]

Returns a new Prism from Option to None.

Returns a new Prism from Option to None.

Attributes

final 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].

Attributes

final implicit def some[S, A](implicit prism: Prism[S, A]): Prism[Option[S], Some[A]]

Returns a new Prism from Option to Some.

Returns a new Prism from Option to Some.

Attributes

Inherited implicits

final implicit def derive[S, A <: S](implicit 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.

Attributes

Inherited from:
PrismLowPriority (hidden)