OMemStream.read

Read an element from stream. If there are no elements, returns default constructed T

  1. ubyte[] read(size_t size)
  2. T read()
    struct OMemStream
    @trusted @nogc nothrow
    T
    read
    (
    T
    )
    ()

Examples

ubyte[1] data = [13];
auto stream = OMemStream(data);
assert(stream.read!ubyte == 13);
assert(stream.read!ubyte == ubyte.init);

Meta