Companion for Codec.
Attributes
- Companion
- trait
- Source
- Codec.scala
- Graph
-
- Supertypes
- Self type
-
Codec.type
Members list
Type members
Classlikes
Attributes
- Source
- Codec.scala
- Supertypes
- Self type
Value members
Concrete methods
Attributes
- Source
- Codec.scala
Creates a codec from encoder and decoder functions.
Creates a codec from an encoder and a decoder.
Attributes
- Source
- Codec.scala
Constructs a Codec[(A, B, ..., N)]
from a tuple (Codec[A], Codec[B], ..., Codec[N])
.
Constructs a Codec[(A, B, ..., N)]
from a tuple (Codec[A], Codec[B], ..., Codec[N])
.
Attributes
- Source
- Codec.scala
Provides a Codec[A]
that delegates to a lazily evaluated Codec[A]
. Typically used to consruct codecs for recursive structures.
Provides a Codec[A]
that delegates to a lazily evaluated Codec[A]
. Typically used to consruct codecs for recursive structures.
Attributes
- Source
- Codec.scala
Inherited methods
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.
Attributes
- Inherited from:
- DecoderFunctions
- Source
- Decoder.scala
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
- Inherited from:
- EncoderFunctions
- Source
- Encoder.scala
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
.
Attributes
- Inherited from:
- DecoderFunctions
- Source
- Decoder.scala
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
.
Attributes
- Inherited from:
- DecoderFunctions
- Source
- Decoder.scala
Encodes the specified value using the given Encoder[A]
.
Encodes the specified value using the given Encoder[A]
.
Attributes
- Inherited from:
- EncoderFunctions
- Source
- Encoder.scala
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
- Inherited from:
- EncoderFunctions
- Source
- Encoder.scala
Givens
Givens
Attributes
- Source
- Codec.scala
Attributes
- Source
- Codec.scala
Attributes
- Source
- Codec.scala
Attributes
- Source
- Codec.scala
Attributes
- Source
- Codec.scala
Attributes
- Source
- Codec.scala
Attributes
- Source
- Codec.scala
Attributes
- Source
- Codec.scala
Attributes
- Source
- Codec.scala
Attributes
- Source
- Codec.scala
Attributes
- Source
- Codec.scala
Attributes
- Source
- Codec.scala
Attributes
- Source
- Codec.scala
Attributes
- Source
- Codec.scala
Attributes
- Source
- Codec.scala
Attributes
- Source
- Codec.scala
Extensions
Extensions
When called on a Codec[A]
where A
is not a tuple, creates a new codec that encodes/decodes a tuple of (B, A)
. For example,
When called on a Codec[A]
where A
is not a tuple, creates a new codec that encodes/decodes a tuple of (B, A)
. For example,
uint8 :: utf8
has type Codec[(Int, Int)]
.
Attributes
- Source
- Codec.scala
Attributes
- Source
- Codec.scala
When called on a Codec[A]
for some A <: Tuple
, returns a new codec that encodes/decodes the tuple A
followed by the value B
, where the latter is encoded/decoded with the codec returned from applying A
to f
.
When called on a Codec[A]
for some A <: Tuple
, returns a new codec that encodes/decodes the tuple A
followed by the value B
, where the latter is encoded/decoded with the codec returned from applying A
to f
.
Attributes
- Source
- Codec.scala
Builds a Codec[A *: B]
from a Codec[A]
and a Codec[B]
where B
is a tuple type. That is, this operator is a codec-level tuple prepend operation.
Builds a Codec[A *: B]
from a Codec[A]
and a Codec[B]
where B
is a tuple type. That is, this operator is a codec-level tuple prepend operation.
Value parameters
- codec
-
codec to prepend
Attributes
- Source
- Codec.scala
Builds a Codec[A ++ B]
from a Codec[A]
and a Codec[B]
where A
and B
are tuples. That is, this operator is a codec-level tuple concat operation.
Builds a Codec[A ++ B]
from a Codec[A]
and a Codec[B]
where A
and B
are tuples. That is, this operator is a codec-level tuple concat operation.
Value parameters
- codecA
-
codec to concat
Attributes
- Source
- Codec.scala
When called on a Codec[A]
for some A <: Tuple
, returns a new codec that encodes/decodes the tuple A
followed by the tuple B
, where the latter is encoded/decoded with the codec returned from applying A
to f
.
When called on a Codec[A]
for some A <: Tuple
, returns a new codec that encodes/decodes the tuple A
followed by the tuple B
, where the latter is encoded/decoded with the codec returned from applying A
to f
.
Attributes
- Source
- Codec.scala
Creates a new codec that encodes/decodes a tuple of A :: B
given a function A => Codec[B]
. This allows later parts of a tuple codec to be dependent on earlier values.
Creates a new codec that encodes/decodes a tuple of A :: B
given a function A => Codec[B]
. This allows later parts of a tuple codec to be dependent on earlier values.
Attributes
- Source
- Codec.scala
codecB :+ codecA
returns a new codec that encodes/decodes the tuple B
followed by an A
. That is, this operator is a codec-level tuple append operation.
codecB :+ codecA
returns a new codec that encodes/decodes the tuple B
followed by an A
. That is, this operator is a codec-level tuple append operation.
Attributes
- Source
- Codec.scala