XmlCodec

zio.blocks.schema.xml.XmlCodec
See theXmlCodec companion object
abstract class XmlCodec[A] extends BinaryCodec[A]

Attributes

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

Members list

Value members

Abstract methods

def decodeValue(in: Xml): A

Attributes

Source
XmlCodec.scala
def encodeValue(x: A): Xml

Attributes

Source
XmlCodec.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
XmlCodec.scala
def decode(input: ByteBuffer, config: ReaderConfig): Either[SchemaError, A]

Attributes

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

Attributes

Source
XmlCodec.scala
def decode(input: Array[Byte], config: ReaderConfig): Either[SchemaError, A]

Attributes

Source
XmlCodec.scala
def decode(input: String): Either[SchemaError, A]

Attributes

Source
XmlCodec.scala
def decode(input: String, config: ReaderConfig): Either[SchemaError, A]

Attributes

Source
XmlCodec.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
XmlCodec.scala
def encode(value: A, output: ByteBuffer, config: WriterConfig): Unit

Attributes

Source
XmlCodec.scala
def encode(value: A): Array[Byte]

Attributes

Source
XmlCodec.scala
def encode(value: A, config: WriterConfig): Array[Byte]

Attributes

Source
XmlCodec.scala
def encodeToString(value: A): String

Attributes

Source
XmlCodec.scala
def encodeToString(value: A, config: WriterConfig): String

Attributes

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

Throws a XmlCodecError wrapping the given error and adding a span.

Throws a XmlCodecError wrapping the given error and adding a span.

Value parameters

error

the error to wrap

span

the span to add to the error

Attributes

Throws
XmlCodecError

always

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

Throws a XmlCodecError wrapping the given error and adding two spans.

Throws a XmlCodecError wrapping the given error and adding two spans.

Value parameters

error

the error to wrap

span1

the first span to add to the error

span2

the second span to add to the error

Attributes

Throws
XmlCodecError

always

Source
XmlCodec.scala
def error(message: String): Nothing

Throws a XmlCodecError with the given error message.

Throws a XmlCodecError with the given error message.

Value parameters

message

the error message

Attributes

Throws
XmlCodecError

always

Source
XmlCodec.scala