PackerImpl.beginMap

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)
  2. PackerImpl beginMap(size_t length)
    struct PackerImpl(Stream)
    ref return
    beginMap
    (
    in size_t length
    )
    if (
    isOutputRange!(Stream, ubyte) &&
    isOutputRange!(Stream, ubyte[])
    )

Parameters

length size_t

the length of container.

Return Value

self, i.e. for method chaining.

Meta