CanGet

dev.constructive.eo.CanGet
See theCanGet companion object
trait CanGet[S, A]

Capability: an A can be read out of an S — the carrier-free surface of any optic whose carrier admits accessor.Accessor (Lens, Iso, Getter).

This is the type to name in a consuming signature: leave the subject generic and demand only the evidence the method needs — def render[T](t: T)(using id: CanGet[T, OrderId]). Concrete optic types belong where optics are constructed and composed. One optic given per (S, A) pair should be in scope at a call site — capabilities follow ordinary typeclass coherence; newtype same-typed foci apart rather than relying on implicit priority to pick between them.

Attributes

Companion
object
Source
CanGet.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class BijectionIso[S, T, A, B]
class GetReplaceLens[S, T, A, B]
class Getter[S, A]
class SplitCombineLens[S, T, A, B, XA]
class SimpleLens[S, A, XA]

Members list

Value members

Abstract methods

def get(s: S): A

Attributes

Source
CanGet.scala