parseType

Parses the MessagePack object with specified type.

Note: For fixext types returns a ubyteN reference to the data input buffer. The first element in the return value contains the type, the rest of the array is the ubytefixExtLength part.

Warning: The type is not verified in this function and this function will return incorrect results if the type does not match the input data.

Memory safety is not affected when passing a wrong type.

  1. auto parseType(ref ubyte[DataSize!type] data)
  2. ubyte[DataSize!type - 1] parseType(ref ubyte[DataSize!type] data)
    nothrow @nogc pure @safe ref
    ubyte[DataSize!type - 1]
    parseType
    ()
    (
    ref ubyte[DataSize!type] data
    )
    if (
    isFixExt!type
    )

Meta