trait RowDecoderF[H[+a] <: Option[a], T, Header] extends AnyRef

Describes how a row can be decoded to the given type.

RowDecoderF provides convenient methods such as map, emap, or flatMap to build new decoders out of more basic one.

Actually, RowDecoderF has a cats MonadError instance. To get the full power of it, import cats.syntax.all._.

Annotations
@FunctionalInterface()
Source
RowDecoderF.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RowDecoderF
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def apply(row: RowF[H, Header]): DecoderResult[T]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. def either[B](cd: RowDecoderF[H, B, Header]): RowDecoderF[H, Either[T, B], Header]

    Similar to or, but return the result as an Either signaling which row decoder succeeded.

    Similar to or, but return the result as an Either signaling which row decoder succeeded. Allows for parsing an unrelated type in case of failure.

    B

    the type the alternative decoder returns

    cd

    the alternative decoder

    returns

    a decoder combining both decoders

  7. def emap[T2](f: (T) => DecoderResult[T2]): RowDecoderF[H, T2, Header]

    Map the parsed value, potentially failing.

    Map the parsed value, potentially failing.

    T2

    the result type

    f

    the mapping function

    returns

    a row decoder reading the mapped type

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. def flatMap[T2](f: (T) => RowDecoderF[H, T2, Header]): RowDecoderF[H, T2, Header]

    Map the parsed value to a new decoder, which in turn will be applied to the parsed value.

    Map the parsed value to a new decoder, which in turn will be applied to the parsed value.

    T2

    the result type

    f

    the mapping function

    returns

    a row decoder reading the mapped type

  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def map[T2](f: (T) => T2): RowDecoderF[H, T2, Header]

    Map the parsed value.

    Map the parsed value.

    T2

    the result type

    f

    the mapping function

    returns

    a row decoder reading the mapped type

  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. def or[TT >: T](cd: => RowDecoderF[H, TT, Header]): RowDecoderF[H, TT, Header]

    Fail-over.

    Fail-over. If this decoder fails, try the supplied other decoder.

    TT

    the return type

    cd

    the fail-over decoder

    returns

    a decoder combining this and the other decoder

  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped