Encoder

object Encoder extends EncoderFunctions
Companion for Encoder.
Companion
class
class Object
trait Matchable
class Any

Document{}

def apply[A](f: A => Attempt[BitVector]): Encoder[A]
Creates an encoder from the specified function.
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.
Inhertied from
EncoderFunctions
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.
Inhertied from
EncoderFunctions
final def encode[A](a: A)(using encA: Encoder[A]): Attempt[BitVector]
Encodes the specified value using the implicit Encoder[A].
Inhertied from
EncoderFunctions

Type members

Classlikes

final class AsSyntax[A](self: Encoder[A]) extends AnyVal

Value members

Methods

inline def apply[A](using e: Encoder[A]): Encoder[A]

Givens

Givens

given given_Transform_Encoder: Transform[[A] =>> Encoder[A]]