Codec

abstract class Codec[A] extends Encoder[A] with Decoder[A]
Companion:
object
trait Decoder[A]
class Encoder[A]
class Object
trait Matchable
class Any

Value members

Abstract methods

def decode(reader: BsonReader, decoderContext: DecoderContext): A
Implicitly added by fromCodec
def encode(writer: BsonWriter, value: A, encoderContext: EncoderContext): Unit
Implicitly added by fromCodec

Encode an instance of the type parameter A into a BSON value.

Encode an instance of the type parameter A into a BSON value.

Value parameters:
value

the value to encode

writer

the BSON writer to encode into

Concrete methods

def bimap[B](mapF: A => B, contramapF: B => A): Codec[B]
Implicitly added by list

Returns a new Codec that encodes and decodes values of type B using this codec.

Returns a new Codec that encodes and decodes values of type B using this codec.

def bimap[B](mapF: A => B, contramapF: B => A): Codec[B]
Implicitly added by nestedOption

Returns a new Codec that encodes and decodes values of type B using this codec.

Returns a new Codec that encodes and decodes values of type B using this codec.

def bimap[B](mapF: A => B, contramapF: B => A): Codec[B]
Implicitly added by option

Returns a new Codec that encodes and decodes values of type B using this codec.

Returns a new Codec that encodes and decodes values of type B using this codec.

def bimap[B](mapF: A => B, contramapF: B => A): Codec[B]
Implicitly added by seq

Returns a new Codec that encodes and decodes values of type B using this codec.

Returns a new Codec that encodes and decodes values of type B using this codec.

def bimap[B](mapF: A => B, contramapF: B => A): Codec[B]
Implicitly added by set

Returns a new Codec that encodes and decodes values of type B using this codec.

Returns a new Codec that encodes and decodes values of type B using this codec.

def bimap[B](mapF: A => B, contramapF: B => A): Codec[B]
Implicitly added by vector

Returns a new Codec that encodes and decodes values of type B using this codec.

Returns a new Codec that encodes and decodes values of type B using this codec.

def bimap[B](mapF: A => B, contramapF: B => A): Codec[B]

Returns a new Codec that encodes and decodes values of type B using this codec.

Returns a new Codec that encodes and decodes values of type B using this codec.

def contramap[B](f: B => A): Encoder[B]
Implicitly added by fromCodec

Returns a new Encoder by applying a function that maps a B to an A, before encoding as an A using this encoder.

Returns a new Encoder by applying a function that maps a B to an A, before encoding as an A using this encoder.

def map[B](f: A => B): Decoder[B]
Implicitly added by fromCodec

Returns a new Decoder by applying a function that maps an A to a B, after decoding as an A using this decoder.

Returns a new Decoder by applying a function that maps an A to a B, after decoding as an A using this decoder.

Inherited methods

def contramap[B](f: B => A): Encoder[B]
Implicitly added by list

Returns a new Encoder by applying a function that maps a B to an A, before encoding as an A using this encoder.

Returns a new Encoder by applying a function that maps a B to an A, before encoding as an A using this encoder.

Inherited from:
Encoder
def contramap[B](f: B => A): Encoder[B]
Implicitly added by nestedOption

Returns a new Encoder by applying a function that maps a B to an A, before encoding as an A using this encoder.

Returns a new Encoder by applying a function that maps a B to an A, before encoding as an A using this encoder.

Inherited from:
Encoder
def contramap[B](f: B => A): Encoder[B]
Implicitly added by option

Returns a new Encoder by applying a function that maps a B to an A, before encoding as an A using this encoder.

Returns a new Encoder by applying a function that maps a B to an A, before encoding as an A using this encoder.

Inherited from:
Encoder
def contramap[B](f: B => A): Encoder[B]
Implicitly added by seq

Returns a new Encoder by applying a function that maps a B to an A, before encoding as an A using this encoder.

Returns a new Encoder by applying a function that maps a B to an A, before encoding as an A using this encoder.

Inherited from:
Encoder
def contramap[B](f: B => A): Encoder[B]
Implicitly added by set

Returns a new Encoder by applying a function that maps a B to an A, before encoding as an A using this encoder.

Returns a new Encoder by applying a function that maps a B to an A, before encoding as an A using this encoder.

Inherited from:
Encoder
def contramap[B](f: B => A): Encoder[B]
Implicitly added by vector

Returns a new Encoder by applying a function that maps a B to an A, before encoding as an A using this encoder.

Returns a new Encoder by applying a function that maps a B to an A, before encoding as an A using this encoder.

Inherited from:
Encoder
def contramap[B](f: B => A): Encoder[B]

Returns a new Encoder by applying a function that maps a B to an A, before encoding as an A using this encoder.

Returns a new Encoder by applying a function that maps a B to an A, before encoding as an A using this encoder.

Inherited from:
Encoder
def decode(reader: BsonReader, decoderContext: DecoderContext): A
Implicitly added by list
Inherited from:
Decoder
def decode(reader: BsonReader, decoderContext: DecoderContext): A
Implicitly added by nestedOption
Inherited from:
Decoder
def decode(reader: BsonReader, decoderContext: DecoderContext): A
Implicitly added by option
Inherited from:
Decoder
def decode(reader: BsonReader, decoderContext: DecoderContext): A
Implicitly added by seq
Inherited from:
Decoder
def decode(reader: BsonReader, decoderContext: DecoderContext): A
Implicitly added by set
Inherited from:
Decoder
def decode(reader: BsonReader, decoderContext: DecoderContext): A
Implicitly added by vector
Inherited from:
Decoder
def decode(reader: BsonReader, decoderContext: DecoderContext): A
Inherited from:
Decoder
def encode(writer: BsonWriter, value: A, encoderContext: EncoderContext): Unit
Implicitly added by list

Encode an instance of the type parameter A into a BSON value.

Encode an instance of the type parameter A into a BSON value.

Value parameters:
value

the value to encode

writer

the BSON writer to encode into

Inherited from:
Encoder
def encode(writer: BsonWriter, value: A, encoderContext: EncoderContext): Unit
Implicitly added by nestedOption

Encode an instance of the type parameter A into a BSON value.

Encode an instance of the type parameter A into a BSON value.

Value parameters:
value

the value to encode

writer

the BSON writer to encode into

Inherited from:
Encoder
def encode(writer: BsonWriter, value: A, encoderContext: EncoderContext): Unit
Implicitly added by option

Encode an instance of the type parameter A into a BSON value.

Encode an instance of the type parameter A into a BSON value.

Value parameters:
value

the value to encode

writer

the BSON writer to encode into

Inherited from:
Encoder
def encode(writer: BsonWriter, value: A, encoderContext: EncoderContext): Unit
Implicitly added by seq

Encode an instance of the type parameter A into a BSON value.

Encode an instance of the type parameter A into a BSON value.

Value parameters:
value

the value to encode

writer

the BSON writer to encode into

Inherited from:
Encoder
def encode(writer: BsonWriter, value: A, encoderContext: EncoderContext): Unit
Implicitly added by set

Encode an instance of the type parameter A into a BSON value.

Encode an instance of the type parameter A into a BSON value.

Value parameters:
value

the value to encode

writer

the BSON writer to encode into

Inherited from:
Encoder
def encode(writer: BsonWriter, value: A, encoderContext: EncoderContext): Unit
Implicitly added by vector

Encode an instance of the type parameter A into a BSON value.

Encode an instance of the type parameter A into a BSON value.

Value parameters:
value

the value to encode

writer

the BSON writer to encode into

Inherited from:
Encoder
def encode(writer: BsonWriter, value: A, encoderContext: EncoderContext): Unit

Encode an instance of the type parameter A into a BSON value.

Encode an instance of the type parameter A into a BSON value.

Value parameters:
value

the value to encode

writer

the BSON writer to encode into

Inherited from:
Encoder
def map[B](f: A => B): Decoder[B]
Implicitly added by list

Returns a new Decoder by applying a function that maps an A to a B, after decoding as an A using this decoder.

Returns a new Decoder by applying a function that maps an A to a B, after decoding as an A using this decoder.

Inherited from:
Decoder
def map[B](f: A => B): Decoder[B]
Implicitly added by nestedOption

Returns a new Decoder by applying a function that maps an A to a B, after decoding as an A using this decoder.

Returns a new Decoder by applying a function that maps an A to a B, after decoding as an A using this decoder.

Inherited from:
Decoder
def map[B](f: A => B): Decoder[B]
Implicitly added by option

Returns a new Decoder by applying a function that maps an A to a B, after decoding as an A using this decoder.

Returns a new Decoder by applying a function that maps an A to a B, after decoding as an A using this decoder.

Inherited from:
Decoder
def map[B](f: A => B): Decoder[B]
Implicitly added by seq

Returns a new Decoder by applying a function that maps an A to a B, after decoding as an A using this decoder.

Returns a new Decoder by applying a function that maps an A to a B, after decoding as an A using this decoder.

Inherited from:
Decoder
def map[B](f: A => B): Decoder[B]
Implicitly added by set

Returns a new Decoder by applying a function that maps an A to a B, after decoding as an A using this decoder.

Returns a new Decoder by applying a function that maps an A to a B, after decoding as an A using this decoder.

Inherited from:
Decoder
def map[B](f: A => B): Decoder[B]
Implicitly added by vector

Returns a new Decoder by applying a function that maps an A to a B, after decoding as an A using this decoder.

Returns a new Decoder by applying a function that maps an A to a B, after decoding as an A using this decoder.

Inherited from:
Decoder
def map[B](f: A => B): Decoder[B]

Returns a new Decoder by applying a function that maps an A to a B, after decoding as an A using this decoder.

Returns a new Decoder by applying a function that maps an A to a B, after decoding as an A using this decoder.

Inherited from:
Decoder