Skip to content

MessagePackDecoder

[Source]

Implements low-level decoding from the MessagePack serialization format.

You should be familiar with how MessagePack encodes messages if you use this API directly. There are very few guardrails preventing you from incorrectly decoding documents. This is particularly true when using the array and map format family encoding methods.

primitive val MessagePackDecoder

Constructors

create

[Source]

new val create()
: MessagePackDecoder val^

Returns


Public Functions

nil

[Source]

Returns nothing. Throws an error if the next byte isn't a MessagePack nil.

fun box nil(
  b: Reader ref)
: None val ?

Parameters

Returns


bool

[Source]

fun box bool(
  b: Reader ref)
: Bool val ?

Parameters

Returns


positive_fixint

[Source]

fun box positive_fixint(
  b: Reader ref)
: U8 val ?

Parameters

Returns

  • U8 val ?

negative_fixint

[Source]

fun box negative_fixint(
  b: Reader ref)
: I8 val ?

Parameters

Returns

  • I8 val ?

u8

[Source]

fun box u8(
  b: Reader ref)
: U8 val ?

Parameters

Returns

  • U8 val ?

u16

[Source]

fun box u16(
  b: Reader ref)
: U16 val ?

Parameters

Returns


u32

[Source]

fun box u32(
  b: Reader ref)
: U32 val ?

Parameters

Returns


u64

[Source]

fun box u64(
  b: Reader ref)
: U64 val ?

Parameters

Returns


i8

[Source]

fun box i8(
  b: Reader ref)
: I8 val ?

Parameters

Returns

  • I8 val ?

i16

[Source]

fun box i16(
  b: Reader ref)
: I16 val ?

Parameters

Returns


i32

[Source]

fun box i32(
  b: Reader ref)
: I32 val ?

Parameters

Returns


i64

[Source]

fun box i64(
  b: Reader ref)
: I64 val ?

Parameters

Returns


f32

[Source]

fun box f32(
  b: Reader ref)
: F32 val ?

Parameters

Returns


f64

[Source]

fun box f64(
  b: Reader ref)
: F64 val ?

Parameters

Returns


fixstr

[Source]

fun box fixstr(
  b: Reader ref)
: String iso^ ?

Parameters

Returns


str

[Source]

fun box str(
  b: Reader ref)
: String iso^ ?

Parameters

Returns


byte_array

[Source]

fun box byte_array(
  b: Reader ref)
: Array[U8 val] iso^ ?

Parameters

Returns


fixarray

[Source]

Reads a header for a MessgePack "fixarray". This only reads the header. The number of array items returned by this method needs to be read via other methods after this is called.

fun box fixarray(
  b: Reader ref)
: U8 val ?

Parameters

Returns

  • U8 val ?

array_16

[Source]

Reads a header for a MessgePack "array_16". This only reads the header. The number of array items returned by this method needs to be read via other methods after this is called.

fun box array_16(
  b: Reader ref)
: U16 val ?

Parameters

Returns


array_32

[Source]

Reads a header for a MessgePack "array_32". This only reads the header. The number of array items returned by this method needs to be read via other methods after this is called.

fun box array_32(
  b: Reader ref)
: U32 val ?

Parameters

Returns


fixmap

[Source]

Reads a header for a MessgePack "fixmap". This only reads the header. The number of map items returned by this method needs to be read via other methods after this is called.

fun box fixmap(
  b: Reader ref)
: U8 val ?

Parameters

Returns

  • U8 val ?

map_16

[Source]

Reads a header for a MessgePack "map_16". This only reads the header. The number of map items returned by this method needs to be read via other methods after this is called.

fun box map_16(
  b: Reader ref)
: U16 val ?

Parameters

Returns


map_32

[Source]

Reads a header for a MessgePack "map_32". This only reads the header. The number of map items returned by this method needs to be read via other methods after this is called.

fun box map_32(
  b: Reader ref)
: U32 val ?

Parameters

Returns


ext

[Source]

Allows for the reading of user supplied extensions to the MessagePack format.

fixext * types return a tuple representing:

(user supplied type indentifier, data byte array)

fun box ext(
  b: Reader ref)
: (U8 val , Array[U8 val] val) ?

Parameters

Returns


timestamp

[Source]

fun box timestamp(
  b: Reader ref)
: (I64 val , I64 val) ?

Parameters

Returns


eq

[Source]

fun box eq(
  that: MessagePackDecoder val)
: Bool val

Parameters

Returns


ne

[Source]

fun box ne(
  that: MessagePackDecoder val)
: Bool val

Parameters

Returns