trait Codec[A] extends Decoder[A] with Encoder[A]
Provides an encoding and a decoding functions for a given type.
- Alphabetic
- By Inheritance
- Codec
- Encoder
- Decoder
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def read(av: AttributeValue): Either[DecoderError, A]
Attempt to read an AttributeValue to a value of type A
Attempt to read an AttributeValue to a value of type A
- av
Java attribute value object
- returns
either a value of type A or a decoder error
- Definition Classes
- Decoder
- abstract def write(a: A): AttributeValue
Write a value of type A as a Java AttributeValue
Write a value of type A as a Java AttributeValue
- a
value of type A
- returns
a Java AttributeValue object
- Definition Classes
- Encoder
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def emap[B](f: (A) => Either[DecoderError, B]): Decoder[B]
Create a new decoder given a transformation from A to either B or a decoder error
Create a new decoder given a transformation from A to either B or a decoder error
- f
a function returning either a value or an error message
- returns
a new Decoder of type B
- Definition Classes
- Decoder
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def read(av: Map[String, AttributeValue]): Either[DecoderError, A]
Attempt to read a Map of String and AttributeValue to a value of type A
Attempt to read a Map of String and AttributeValue to a value of type A
- av
Java Map of String and AttributeValue
- returns
either a value of type A or a decoder error
- Definition Classes
- Decoder
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)