EncoderFunctions

Provides functions for working with encoders.

class Object
trait Matchable
class Any
object Codec
object Encoder

Document{}

final def encode[A](a: A)(using encA: Encoder[A]): Attempt[BitVector]

Encodes the specified value using the given Encoder[A].

final def encodeBoth[A, B](encA: Encoder[A], encB: Encoder[B])(a: A, b: B): Attempt[BitVector]

Encodes the specified values, one after the other, to a bit vector using the specified encoders.

final def choiceEncoder[A](encoders: Encoder[A]*): Encoder[A]

Creates an encoder that encodes with each of the specified encoders, returning the first successful result.