ReadBuffer.free

struct ReadBuffer(T = ubyte)
@property const
size_t
free
()

Return Value

Type: size_t

Available space.

Examples

ReadBuffer!ubyte b;
size_t numberRead;

assert(b.free == 0);

// Fills the buffer with values 0..10
numberRead = fillBuffer(b[], 0, 10);
b += numberRead;
assert(b.free == b.blockSize - numberRead);
b.clear();
assert(b.free == b.blockSize);

Meta