Class/Object

zio.optics.OpticModule

Optic

Related Docs: object Optic | package OpticModule

Permalink

case class Optic[-GetWhole, -SetWholeBefore, -SetPiece, +GetError, +SetError, +GetPiece, +SetWholeAfter](getOptic: (GetWhole) ⇒ (OpticModule.this)#OpticResult[(GetError, SetWholeAfter), GetPiece], setOptic: (SetPiece) ⇒ (SetWholeBefore) ⇒ (OpticModule.this)#OpticResult[(SetError, SetWholeAfter), SetWholeAfter]) extends Product with Serializable

An Optic is able to get and set a piece of a whole, possibly failing. In the most general possible case the get and set types are distinct and getting may fail with a different error than setting.

Self Type
(OpticModule.this)#Optic[GetWhole, SetWholeBefore, SetPiece, GetError, SetError, GetPiece, SetWholeAfter]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Optic
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Optic(getOptic: (GetWhole) ⇒ (OpticModule.this)#OpticResult[(GetError, SetWholeAfter), GetPiece], setOptic: (SetPiece) ⇒ (SetWholeBefore) ⇒ (OpticModule.this)#OpticResult[(SetError, SetWholeAfter), SetWholeAfter])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def <*>[GetWhole1 <: GetWhole, SetWholeBefore1 >: SetWholeAfter <: SetWholeBefore, SetPiece2, GetError1 >: GetError, SetError1 >: SetError, GetPiece2, SetWholeAfter1 >: SetWholeAfter](that: (OpticModule.this)#Optic[GetWhole1, SetWholeBefore1, SetPiece2, GetError1, SetError1, GetPiece2, SetWholeAfter1]): (OpticModule.this)#Optic[GetWhole1, SetWholeBefore1, (SetPiece, SetPiece2), GetError1, SetError1, (GetPiece, GetPiece2), SetWholeAfter1]

    Permalink

    A symbolic alias for zip.

  4. final def <>[GetWhole1 <: GetWhole, SetWholeBefore1 <: SetWholeBefore, SetPiece1 <: SetPiece, GetError2, SetError2, GetPiece1 >: GetPiece, SetWholeAfter1 >: SetWholeAfter](that: ⇒ (OpticModule.this)#Optic[GetWhole1, SetWholeBefore1, SetPiece1, GetError2, SetError2, GetPiece1, SetWholeAfter1]): (OpticModule.this)#Optic[GetWhole1, SetWholeBefore1, SetPiece1, GetError2, SetError2, GetPiece1, SetWholeAfter1]

    Permalink

    A symbolic alias for orElse.

  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def apply(whole: GetWhole with SetWholeBefore): (OpticModule.this)#OpticPartiallyApplied[SetPiece, GetError, SetError, GetPiece, SetWholeAfter]

    Permalink

    Applies this optic to the specified whole, returning a new optic that no longer needs a whole to get and set and always gets and sets a piece of the specified whole.

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def get(whole: GetWhole): (OpticModule.this)#OpticResult[GetError, GetPiece]

    Permalink

    Gets a piece of the specified whole.

  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. val getOptic: (GetWhole) ⇒ (OpticModule.this)#OpticResult[(GetError, SetWholeAfter), GetPiece]

    Permalink
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def orElse[GetWhole1 <: GetWhole, SetWholeBefore1 <: SetWholeBefore, SetPiece1 <: SetPiece, GetError2, SetError2, GetPiece1 >: GetPiece, SetWholeAfter1 >: SetWholeAfter](that: ⇒ (OpticModule.this)#Optic[GetWhole1, SetWholeBefore1, SetPiece1, GetError2, SetError2, GetPiece1, SetWholeAfter1]): (OpticModule.this)#Optic[GetWhole1, SetWholeBefore1, SetPiece1, GetError2, SetError2, GetPiece1, SetWholeAfter1]

    Permalink

    Constructs a new optic that attempts to get and set with this optic, but if getting or setting fails falls back to getting or setting with that optic.

  19. val setOptic: (SetPiece) ⇒ (SetWholeBefore) ⇒ (OpticModule.this)#OpticResult[(SetError, SetWholeAfter), SetWholeAfter]

    Permalink
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def zip[GetWhole1 <: GetWhole, SetWholeBefore1 >: SetWholeAfter <: SetWholeBefore, SetPiece2, GetError1 >: GetError, SetError1 >: SetError, GetPiece2, SetWholeAfter1 >: SetWholeAfter](that: (OpticModule.this)#Optic[GetWhole1, SetWholeBefore1, SetPiece2, GetError1, SetError1, GetPiece2, SetWholeAfter1]): (OpticModule.this)#Optic[GetWhole1, SetWholeBefore1, (SetPiece, SetPiece2), GetError1, SetError1, (GetPiece, GetPiece2), SetWholeAfter1]

    Permalink

    Constructs a new optic that gets and sets with both this optic and that optic.

    Constructs a new optic that gets and sets with both this optic and that optic. This optic and that optic must get and set different pieces of the whole.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped