EncoderFunctions

scodec.EncoderFunctions

Provides functions for working with encoders.

Attributes

Source:
Encoder.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Codec.type
object Encoder.type

Members list

Concise view

Value members

Concrete methods

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.

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

Attributes

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

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

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

Attributes

Source:
Encoder.scala
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.

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

Attributes

Source:
Encoder.scala