Typed.data

Gets the data as an array of the template's type. The data can also be obtained in the specified format.

  1. D[] data [@property getter]
  2. D[] data [@property getter]
    class Typed(T, B : Buffer = Buffer)
    @property pure nothrow @nogc
    D[]
    data
    (
    D = T
    )
    ()
    if (
    D.sizeof != 1
    )

Examples

auto buffer = new Typed!char("hello");
assert(buffer.data == "hello");
assert(buffer.data!ubyte == [104, 101, 108, 108, 111]);

Meta