Prism

smithy4s.optics.Prism$
See thePrism companion trait
object Prism

Attributes

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

Members list

Value members

Concrete methods

def apply[S, A](_get: S => Option[A])(_inject: A => S): Prism[S, A]

Construct a new Prism by providing functions for getting an Option[A] from S and getting an S given an A.

Construct a new Prism by providing functions for getting an Option[A] from S and getting an S given an A.

Attributes

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

Construct a new Prism with a PartialFunction to avoid needing to exhaustively handle all possible S in the provided get function.

Construct a new Prism with a PartialFunction to avoid needing to exhaustively handle all possible S in the provided get function.

Attributes