LongCodec

vulcan.Codec.LongCodec
case object LongCodec

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Codec[Long]
class Object
trait Matchable
class Any
Show all
Self type
LongCodec.type

Members list

Type members

Inherited types

type AvroType = AvroType0

The Java type that this codec will encode to. The resulting value will in turn be converted to a binary or JSON-based Avro format by the underlying Avro SDK.

The Java type that this codec will encode to. The resulting value will in turn be converted to a binary or JSON-based Avro format by the underlying Avro SDK.

This type is of interest mainly because it determines what Avro type the data will ultimately be encoded to; therefore, we express it using type aliases named according to the Avro type they represent.

Attributes

Inherited from:
WithValidSchema (hidden)
type MirroredElemLabels = EmptyTuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Singleton
type MirroredElemTypes = EmptyTuple

Attributes

Inherited from:
Singleton
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
type MirroredMonoType = Singleton.this.type

The mirrored *-type

The mirrored *-type

Attributes

Inherited from:
Singleton
type MirroredType = Singleton.this.type

Attributes

Inherited from:
Singleton

Deprecated and Inherited types

type Repr = AvroType

Attributes

Deprecated
true
Inherited from:
Codec

Value members

Concrete methods

override def decode(value: Any, schema: Schema): Either[AvroError, Long]

Attempts to decode the specified value using the provided schema.

Attempts to decode the specified value using the provided schema.

Attributes

Definition Classes
override def encode(a: Long): Either[AvroError, Long]

Attempts to encode the specified value using the provided schema.

Attempts to encode the specified value using the provided schema.

Attributes

Definition Classes
override def validSchema: Schema

Attributes

Definition Classes
WithValidSchema

Inherited methods

def fromProduct(p: Product): MirroredMonoType

Create a new instance of type T with elements taken from product p.

Create a new instance of type T with elements taken from product p.

Attributes

Inherited from:
Singleton
final override def imap[B](f: Long => B)(g: B => Long): WithValidSchema[AvroType0, B]

Returns a new Codec which uses this Codec for encoding and decoding, mapping back-and-forth between types A and B.

Returns a new Codec which uses this Codec for encoding and decoding, mapping back-and-forth between types A and B.

Attributes

Definition Classes
WithValidSchema -> Codec
Inherited from:
WithValidSchema (hidden)
def imapError[B](f: Long => Either[AvroError, B])(g: B => Long): Aux[AvroType, B]

Returns a new Codec which uses this Codec for encoding and decoding, mapping back-and-forth between types A and B.

Returns a new Codec which uses this Codec for encoding and decoding, mapping back-and-forth between types A and B.

Similar to Codec#imap, except the mapping from A to B might be unsuccessful.

Attributes

Inherited from:
Codec
final override def imapErrors[B](f: Long => Either[AvroError, B])(g: B => Either[AvroError, Long]): WithValidSchema[AvroType0, B]

Attributes

Definition Classes
WithValidSchema -> Codec
Inherited from:
WithValidSchema (hidden)
final def imapTry[B](f: Long => Try[B])(g: B => Long): Aux[AvroType, B]

Returns a new Codec which uses this Codec for encoding and decoding, mapping back-and-forth between types A and B.

Returns a new Codec which uses this Codec for encoding and decoding, mapping back-and-forth between types A and B.

Similar to Codec#imap, except the mapping from A to B might be unsuccessful.

Attributes

Inherited from:
Codec
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
override def schema: Either[AvroError, Schema]

The schema or an error if the schema could not be generated.

The schema or an error if the schema could not be generated.

Attributes

Definition Classes
WithValidSchema -> Codec
Inherited from:
WithValidSchema (hidden)
final override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Codec -> Any
Inherited from:
Codec