PackerImpl.beginArray

Serializes the type-information to stream.

These methods don't serialize contents. You need to call pack method to serialize contents at your own risk.

packer.beginArray(3).pack(true, 1);  // -> [true, 1,

// other operation

packer.pack("Hi!");                  // -> [true, 1, "Hi!"]
  1. PackerImpl beginArray(size_t length)
    struct PackerImpl(Stream)
    ref return
    beginArray
    (
    in size_t length
    )
    if (
    isOutputRange!(Stream, ubyte) &&
    isOutputRange!(Stream, ubyte[])
    )
  2. PackerImpl beginMap(size_t length)

Parameters

length size_t

the length of container.

Return Value

self, i.e. for method chaining.

Meta