DecoderFunctions

Provides functions for working with decoders.

class Object
trait Matchable
class Any
object Codec
object Decoder

Value members

Concrete methods

final def choiceDecoder[A](decoders: Decoder[A]*): Decoder[A]

Creates a decoder that decodes with each of the specified decoders, returning the first successful result.

Creates a decoder that decodes with each of the specified decoders, returning the first successful result.

final def decodeBoth[A, B](decA: Decoder[A], decB: Decoder[B])(buffer: BitVector): Attempt[DecodeResult[(A, B)]]

Decodes a tuple (A, B) by first decoding A and then using the remaining bits to decode B.

Decodes a tuple (A, B) by first decoding A and then using the remaining bits to decode B.

final def decodeBothCombine[A, B, C](decA: Decoder[A], decB: Decoder[B])(buffer: BitVector)(f: (A, B) => C): Attempt[DecodeResult[C]]

Decodes a C by first decoding A and then using the remaining bits to decode B, then applying the decoded values to the specified function to generate a C.

Decodes a C by first decoding A and then using the remaining bits to decode B, then applying the decoded values to the specified function to generate a C.