PackerImpl.packArray

Serializes the arguments as container to stream.

packer.packArray(true, 1);  // -> [true, 1]
packer.packMap("Hi", 100);  // -> ["Hi":100]

In packMap, the number of arguments must be even.

  1. PackerImpl packArray(Types objects)
    struct PackerImpl(Stream)
    ref
    packArray
    (
    Types...
    )
    (
    auto ref const Types objects
    )
    if (
    isOutputRange!(Stream, ubyte) &&
    isOutputRange!(Stream, ubyte[])
    )
  2. PackerImpl packMap(Types objects)

Parameters

objects Types

the contents to serialize.

Return Value

self, i.e. for method chaining.

Meta