sealed abstract class DecodingContext[A] extends AnyRef
Provides the ability to sequence decoding operations such that the remainder of an operation is fed in to the input of the next operation. This is useful when using codecs in for comprehensions for decoding purposes.
Note: this is a domain specific fail fast state monad.
- Self Type
- DecodingContext[A]
- Annotations
- @deprecated
- Deprecated
(Since version 1.8.2) Use flatMap on Codec or Decoder, which provides equivalent functionality
- Source
- DecodingContext.scala
- Alphabetic
- By Inheritance
- DecodingContext
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def decode(buffer: BitVector): Attempt[DecodeResult[A]]
Runs the sequenced decoding operations by decoding the specified bit vector.
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]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def flatMap[B](f: (A) => DecodingContext[B]): DecodingContext[B]
Returns a context that first decodes using this context, then uses the decoded value and the supplied function to generate a subsequent context, and decodes the remainder of the first decoding operation with the subsequent context.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def map[B](f: (A) => B): DecodingContext[B]
Transforms the decoded value using the supplied function.
- final def mapErr(f: (Err) => Err): DecodingContext[A]
Transforms the decoding error using the supplied function.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toDecoder: Decoder[A]
Converts this context to a decoder instance.
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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()