StreamingUnpacker.purge

Convenient method for unpacking and clearing states.

struct StreamingUnpacker
@safe
purge
()

Return Value

Type: Unpacked

the Unpacked object contains deserialized value.

Examples

foreach (obj; unpacker.purge()) {
    // do stuff
}

is equivalent to

foreach (obj; unpacker.unpacked) {
    // do stuff
}
unpacker.clear();

Meta