Creates a decoder from the specified function.
Provides syntax for summoning a Decoder[A]
from implicit scope.
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.
Decodes the specified bit vector in to a value of type A
using an implicitly available codec.
Repeatedly decodes values of type A
from the specified vector, converts each value to a B
and appends it to an accumulator of type
B
using the supplied zero
value and append
function.
Repeatedly decodes values of type A
from the specified vector, converts each value to a B
and appends it to an accumulator of type
B
using the supplied zero
value and append
function. Terminates when no more bits are available in the vector. Exits upon first decoding error.
tuple consisting of the terminating error if any and the accumulated value
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
.
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
.
Repeatedly decodes values of type A
from the specified vector and returns a collection of the specified type.
Repeatedly decodes values of type A
from the specified vector and returns a collection of the specified type.
Terminates when no more bits are available in the vector or when limit
is defined and that many records have been
decoded. Exits upon first decoding error.
Gets a decoder that returns the input bit vector as its value and also returns the value as its remainder.
Lifts a value of Attempt[A]
in to a Decoder
.
Gets a decoder that transforms the input bit vector with the specified function and returns the result as the remainder.
Creates a decoder that always decodes the specified value and returns the input bit vector unmodified.
Gets a decoder that ignores its input bit vector and sets the remainder to the specified value.
Transform typeclass instance.
Companion for Decoder.