Address6.toBytes

Produces a byte array containing this address in network byte order.

struct Address6
const @nogc nothrow pure @safe
ubyte[16]
toBytes
()

Return Value

Type: ubyte[16]

This address as raw bytes in network byte order.

Examples

auto actual = address6("1:2:3:4:5:6:7:8");
ubyte[16] expected = [0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8];
assert(actual.get.toBytes() == expected);

Meta