p

io.bullet

borer

package borer

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. borer
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait AdtDecoder[T] extends Decoder[T]

    An AdtDecoder is a Decoder whose read method expects to read an envelope (holding the type id) around the actual value encoding.

    An AdtDecoder is a Decoder whose read method expects to read an envelope (holding the type id) around the actual value encoding.

    In order to be able to collapse several envelope levels into a single one, when several AdtDecoder instances call each other, this type also provides read overloads which don't read the type id envelope themselves but can receive the type id from the outside.

  2. trait AdtEncoder[T] extends Encoder[T]

    An AdtEncoder is an Encoder which encodes its values with an envelope holding the value's type id.

    An AdtEncoder is an Encoder which encodes its values with an envelope holding the value's type id.

    It doesn't change or add to the outside interface of Encoder but merely serves as a marker signaling that it takes on the responsibility of encoding the type id in addition to the value itself. This allows outside encoders calling an AdtEncoder to delegate this responsibility rather than performing the task themselves.

  3. sealed abstract class AdtEncodingStrategy extends AnyRef
  4. trait ByteAccess[Bytes] extends AnyRef

    Type class for providing basic access to a Bytes abstraction, as well as construction of a respective Output.

  5. final class ByteStringArrayCodecs extends AnyRef
  6. final case class Codec[A](encoder: Encoder[A], decoder: Decoder[A]) extends Product with Serializable

    A simple encapsulation of an Encoder and Decoder for the same type, as one entity.

    A simple encapsulation of an Encoder and Decoder for the same type, as one entity.

    Sometimes it's easier to supply just a single implicit for a type, rather than two. As an alternative to writing a separate Encoder and Decoder for type A you can also write a Codec for A. (Encoder and Decoder can be implicitly "unpacked" from a codec.)

    However, in order to not hinder composability Codecs should only ever be _supplied_, never consumed. So, if you write an encoder, decoder or codec for a generic type, which itself requires implicitly available encoders and/or decoders for certain type parameters (like Encoder.forOption, for example) then you should never require implicitly available Codecs, but rather Encoders and Decoders separately.

  7. trait Decoder[T] extends AnyRef

    Type class responsible for reading an instance of type T from a Reader.

  8. abstract class DecoderFromApply extends AnyRef
  9. final case class Default[+T](defaultValue: T) extends Product with Serializable
  10. trait Encoder[T] extends AnyRef

    Type class responsible for writing an instance of type T to a Writer.

  11. final case class Float16(value: Float) extends Product with Serializable

    Wrapper for Float value that gets encoded to and decoded from 16-bit Half-Precision Floats (two-byte IEEE 754).

  12. trait Input[Bytes] extends AnyRef

    Mutable abstraction wrapping some source of bytes to serve as parser input.

  13. final class InputReader[Config <: Config] extends AnyRef

    Stateful, mutable abstraction for reading a stream of CBOR or JSON data from the given input.

  14. sealed abstract class LowPrioDecoders extends TupleDecoders
  15. sealed abstract class LowPrioEncoders extends TupleEncoders
  16. sealed abstract class LowPrioNullable extends AnyRef
  17. final class Nullable[+T] extends AnyVal
  18. trait Output extends AnyRef

    Abstraction over serialization output.

    Abstraction over serialization output.

    The implementation can be either mutable or immutable.

  19. type Reader = InputReader[_ <: Config]
  20. abstract class Receiver extends AnyRef

    The common interface of all types that consume CBOR data.

    The common interface of all types that consume CBOR data. (On the reading as well as the writing side)

  21. final case class SimpleValue(value: Int) extends Product with Serializable

    Abstraction for a "simple value" in CBOR-speak.

    Abstraction for a "simple value" in CBOR-speak.

    value

    the value's code

  22. sealed abstract class Tag extends AnyRef

    Abstraction for a "tag" in CBOR-speak.

  23. final case class TaggedValue[T](tag: Tag, value: T) extends Product with Serializable
  24. sealed abstract class Target extends AnyRef

    Super-type of the Cbor and Json objects.

    Super-type of the Cbor and Json objects.

    Used, for example, as the type of the target member of Reader and Writer instances, which allows custom logic to pick different (de)serialization approaches depending on whether the target is CBOR or JSON.

  25. abstract class TupleDecoders extends DecoderFromApply
  26. abstract class TupleEncoders extends AnyRef
  27. final class Writer extends AnyRef

    Stateful, mutable abstraction for writing a stream of CBOR or JSON data to the given Output.

Value Members

  1. object AdtEncodingStrategy
  2. object Borer

    Main entry point into the CBOR API.

  3. object ByteAccess
  4. object ByteStringArrayCodecs
  5. object Cbor extends Target with Product with Serializable
  6. object Codec extends Serializable
  7. object DataItem

    A simple mapping of CBOR data item types to bits for efficient masking.

  8. object Decoder extends LowPrioDecoders
  9. object DecodingSetup
  10. object Default extends Serializable
  11. object Dom

    Simple Document Object Model (DOM) for CBOR.

    Simple Document Object Model (DOM) for CBOR.

    Practically all valid CBOR encodings can be decoded into this structure and vice versa. Provided as an alternative to plain Writer-based encoding and Reader-based decoding.

  12. object Encoder extends LowPrioEncoders
  13. object EncodingSetup
  14. object Float16 extends Serializable

    Logic for converting half-precision (16-bit) floats to and from bytes.

    Logic for converting half-precision (16-bit) floats to and from bytes.

    Source: https://stackoverflow.com/questions/6162651 (The author says it's public domain.)

    The documented author's "extensions" have been removed for clean round-tripping to and from Float.

  15. object Input extends FromByteArrayInput with FromByteBufferInput with FromInputStreamInput with FromFileInput with FromIteratorInput
  16. object Json extends Target with Product with Serializable
  17. object Logging

    Facilities for on-the-side logging of either encoding or decoding progress, which can be useful for debugging problems with the input or custom codec logic.

    Facilities for on-the-side logging of either encoding or decoding progress, which can be useful for debugging problems with the input or custom codec logic.

    Logging can be done either before or after the input validation step, depending on your needs. If unsure, go for after-validation logging, at least initially. (This is also the default.) For example, to log decoding progress to the console you can say:

    Cbor.decode(inputBytes).withPrintLogging().to[MyType]
  18. object NullOptions

    In order to enable an alternative Option codec, which encodes None to null and Some to an unwrapped value you can import the members of this object with

    In order to enable an alternative Option codec, which encodes None to null and Some to an unwrapped value you can import the members of this object with

    import io.bullet.borer.NullOptions._
  19. object Nullable extends LowPrioNullable
  20. object Output extends ToByteArrayOutput with ToByteBufferOutput with ToFileOutput with ToOutputStreamOutput
  21. object Reader
  22. object Receiver
  23. object Scalac
  24. object SimpleValue extends Serializable
  25. object Tag
  26. object TaggedValue extends Serializable
  27. object Undefined extends Product with Serializable

    Abstraction for the "undefined" value in CBOR-speak.

  28. object Utf8
  29. object Writer

Inherited from AnyRef

Inherited from Any

Ungrouped