encodeUint32

fnResult!(size_t, VarintError) encodeUint32(uint v, return scope ubyte[] dst) @safe pure nothrow @nogc

Encodes v as a canonical varint into dst (non-committing).

Parameters

vthe value to encode.
dstcaller-provided output buffer.

Returns

Result!(size_t, VarintError): bytes written on success; on

INSUFFICIENT_CAPACITY (with examined == 0) the buffer is untouched. Use uint32Length to size the buffer.