Creates a generalized codec from an encoder and a decoder.
Provides syntax for summoning a GenCodec[A, B]
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.
Creates an encoder that encodes with each of the specified encoders, returning the first successful result.
Creates an encoder that encodes with each of the specified encoders, returning the first successful result.
Decodes the specified bit vector in to a value of type A
using an implicitly available codec.
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 Monoid[B]
.
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 Monoid[B]
.
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.
Decodes the specified bit vector in to a value of type A
using an implicitly available
codec and discards the remaining bits or throws an IllegalArgumentException
if decoding
fails.
Decodes the specified bit vector in to a value of type A
using an implicitly available
codec and discards the remaining bits or throws an IllegalArgumentException
if decoding
fails.
Decodes the specified bit vector in to a value of type A
using an implicitly available
codec and discards the remaining bits.
Decodes the specified bit vector in to a value of type A
using an implicitly available
codec and discards the remaining bits.
Encodes the specified value to a bit vector using an implicitly available encoder.
Encodes the specified value to a bit vector using an implicitly available encoder.
Encodes the specified values, one after the other, to a bit vector using the specified encoders.
Encodes the specified values, one after the other, to a bit vector using the specified encoders.
Encodes all elements of the specified sequence and concatenates the results, or returns the first encountered error.
Encodes all elements of the specified sequence and concatenates the results, or returns the first encountered error.
Encodes the specified value to a bit vector using an implicitly available encoder or throws an IllegalArgumentException
if encoding fails.
Encodes the specified value to a bit vector using an implicitly available encoder or throws an IllegalArgumentException
if encoding fails.
Profunctor instance.
Companion for GenCodec.