ReadBuffer.free

class ReadBuffer
@property const pure nothrow @safe @nogc
size_t
free
()

Return Value

Type: size_t

Available space.

Examples

auto b = defaultAllocator.make!ReadBuffer;
size_t numberRead;

// Fills the buffer with values 0..10
assert(b.free == b.blockSize);

numberRead = fillBuffer(b[], b.free, 0, 10);
b += numberRead;
assert(b.free == b.blockSize - numberRead);
b.clear();
assert(b.free == b.blockSize);

defaultAllocator.dispose(b);

Meta