Api

io.bullet.borer.EncodingSetup.Api
sealed trait Api[Config <: EncodingConfig] extends CommonApi[Config]

Attributes

Graph
Supertypes
trait CommonApi[Config]
class Object
trait Matchable
class Any
Known subtypes
trait JsonApi[T, Config]

Members list

Value members

Abstract methods

def to[R](using op: ToTypeProvider[R]): Sealed[Out, R]

Encodes an instance of T to the given type R type using the configured options.

Encodes an instance of T to the given type R type using the configured options.

Attributes

def to[R](target: R)(using op: ToValueProvider[R]): Sealed[Out, R]

Encodes an instance of T to the given target using the configured options.

Encodes an instance of T to the given target using the configured options.

Attributes

def toByteArray: Array[Byte]

Short-cut for encoding to a plain byte array, throwing an exception in case of any failures.

Short-cut for encoding to a plain byte array, throwing an exception in case of any failures.

Attributes

def toByteArrayEither: Either[Error[Output], Array[Byte]]

Short-cut for encoding to a plain byte array, wrapped in an Either for error handling.

Short-cut for encoding to a plain byte array, wrapped in an Either for error handling.

NOTE: You can get a slightly more narrowly typed error by using .to[Array[Byte]].resultEither instead!

Attributes

def toByteArrayTry: Try[Array[Byte]]

Short-cut for encoding to a plain byte array, wrapped in a Try for error handling.

Short-cut for encoding to a plain byte array, wrapped in a Try for error handling.

Attributes

def toByteBuffer: ByteBuffer

Short-cut for encoding to a ByteBuffer, throwing an exception in case of any failures.

Short-cut for encoding to a ByteBuffer, throwing an exception in case of any failures.

Attributes

def toByteBufferEither: Either[Error[Output], ByteBuffer]

Short-cut for encoding to a ByteBuffer, wrapped in an Either for error handling.

Short-cut for encoding to a ByteBuffer, wrapped in an Either for error handling.

NOTE: You can get a slightly more narrowly typed error by using .to[ByteBuffer].resultEither instead!

Attributes

def toByteBufferTry: Try[ByteBuffer]

Short-cut for encoding to a ByteBuffer, wrapped in a Try for error handling.

Short-cut for encoding to a ByteBuffer, wrapped in a Try for error handling.

Attributes

Inherited methods

def withConfig(config: Config): CommonApi.this.type

Configures the Config for this encoding/decoding run.

Configures the Config for this encoding/decoding run.

Attributes

Inherited from:
CommonApi
def withLogging(createLogger: LevelInfo => Logger): CommonApi.this.type

Enables logging of the encoding/decoding progress to the given Logging.Logger.

Enables logging of the encoding/decoding progress to the given Logging.Logger.

Attributes

Inherited from:
CommonApi
def withPrintLogging(maxShownByteArrayPrefixLen: Int, maxShownStringPrefixLen: Int, maxShownArrayElems: Int, maxShownMapEntries: Int, initialGutterWidth: Int, renderLevelCount: Boolean, renderEndOfInput: Boolean, renderCommas: Boolean, indentation: String, mapKeySep: String): CommonApi.this.type

Enables logging of the encoding/decoding progress to the console. Each data item that is written/received by the application is pretty printed to the console on its own line.

Enables logging of the encoding/decoding progress to the console. Each data item that is written/received by the application is pretty printed to the console on its own line.

Attributes

Inherited from:
CommonApi
def withStringLogging(stringBuilder: StringBuilder, maxShownByteArrayPrefixLen: Int, maxShownStringPrefixLen: Int, maxShownArrayElems: Int, maxShownMapEntries: Int, initialGutterWidth: Int, renderLevelCount: Boolean, renderEndOfInput: Boolean, renderCommas: Boolean, indentation: String, mapKeySep: String, lineSep: String, mapValueOnNewLine: Boolean): CommonApi.this.type

Enables logging of the encoding/decoding progress to the given JStringBuilder.

Enables logging of the encoding/decoding progress to the given JStringBuilder.

Attributes

Inherited from:
CommonApi
def withTransformerAdded(transformer: () => Config): CommonApi.this.type

Allows for injecting additional custom logic into the encoding/decoding process. Used, for example, for on-the-side Logging.

Allows for injecting additional custom logic into the encoding/decoding process. Used, for example, for on-the-side Logging.

Attributes

Inherited from:
CommonApi