Struct ArraySource

Source that reads from an array as if it were a true source.

struct ArraySource(InternalType) ;

<

Constructors

NameDescription
this (array) Takes in the array and stores it.

Example

import elembuf, source;

auto buf = buffer("");
auto src = "World".ArraySource!char;

buf ~= src;
assert(buf == "World");

Example

import elembuf, source;

auto buf = buffer([0]);
auto src = ([1,2,3,4,5]).ArraySource!int;

buf ~= src;
assert(buf == [0,1,2,3,4,5]);