AvroCodec

zio.blocks.schema.avro.AvroCodec
See theAvroCodec companion object
abstract class AvroCodec[A] extends BinaryCodec[A]

Attributes

Companion
object
Source
AvroCodec.scala
Graph
Supertypes
class BinaryCodec[A]
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def avroSchema: Schema

Attributes

Source
AvroCodec.scala
def decodeValue(decoder: BinaryDecoder): A

Attributes

Source
AvroCodec.scala
def encodeValue(value: A, encoder: BinaryEncoder): Unit

Attributes

Source
AvroCodec.scala

Concrete methods

override def decode(input: ByteBuffer): Either[SchemaError, A]

Decodes the specified input into a value of the target type.

Decodes the specified input into a value of the target type.

Value parameters

input

The input data that needs to be decoded.

Attributes

Returns

Either a SchemaError indicating the decoding failure, or a decoded value.

Definition Classes
Source
AvroCodec.scala
def decode(input: Array[Byte]): Either[SchemaError, A]

Attributes

Source
AvroCodec.scala
def decode(input: InputStream): Either[SchemaError, A]

Attributes

Source
AvroCodec.scala
override def encode(value: A, output: ByteBuffer): Unit

Encodes the given value into the specified output representation.

Encodes the given value into the specified output representation.

Value parameters

output

The target output into which the value will be encoded.

value

The value to be encoded.

Attributes

Returns

This method does not return a value.

Definition Classes
Source
AvroCodec.scala
def encode(value: A): Array[Byte]

Attributes

Source
AvroCodec.scala
def encode(value: A, output: OutputStream): Unit

Attributes

Source
AvroCodec.scala
def error(expectation: String): Nothing

Attributes

Source
AvroCodec.scala
def error(span: Node, error: Throwable): Nothing

Attributes

Source
AvroCodec.scala
def error(span1: Node, span2: Node, error: Throwable): Nothing

Attributes

Source
AvroCodec.scala