decode

fnResult!(T, BinaryError) decode(T)(scope const(ubyte)[] src, ByteOrder order) if (isWireScalar!T) @safe pure nothrow @nogc

Decodes one scalar of type T from the start of src in byte order order — the one-off form of the reader's get. Bytes beyond T.sizeof are ignored.

Parameters

srcthe encoded bytes.
orderthe byte order.

Returns

the value, or SHORT_INPUT at offset 0 when src is

shorter than T.sizeof.