SingletonCodec

mcodec.SingletonCodec
final class SingletonCodec[T](val value: T) extends ObjectCodec[T], SizedCodec[T]

Attributes

Source
DerivedCodecs.scala
Graph
Supertypes
trait SizedCodec[T]
trait ObjectCodec[T]
trait NullSafeCodec[T]
trait MCodec[T]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def readObject(in: ObjectInput): T

Attributes

Source
DerivedCodecs.scala
def sizeOf(value: T): Int

Attributes

Source
DerivedCodecs.scala
def writeObject(out: ObjectOutput, v: T): Unit

Attributes

Source
DerivedCodecs.scala

Inherited methods

final def nullable: MCodec[T | Null]

Attributes

Inherited from:
MCodec
Source
MCodec.scala
final def read(input: Input): T

Attributes

Inherited from:
NullSafeCodec
Source
BaseCodecs.scala
final def readNonNull(input: Input): T

Attributes

Inherited from:
ObjectCodec
Source
BaseCodecs.scala
final inline def transform[U](inline onWrite: U => T, inline onRead: T => U): MCodec[U]

Attributes

Inherited from:
MCodec
Source
MCodec.scala
final def transformed[U](onRead: T => U)(onWrite: U => T): MCodec[U]

Attributes

Inherited from:
MCodec
Source
MCodec.scala
final def write(output: Output, value: T): Unit

Attributes

Inherited from:
NullSafeCodec
Source
BaseCodecs.scala
final def writeNonNull(output: Output, value: T): Unit

Attributes

Inherited from:
ObjectCodec
Source
BaseCodecs.scala

Concrete fields

val value: T

Attributes

Source
DerivedCodecs.scala