Buffer

Undocumented in source.

Postblit

this(this)
this(this)

Disable postblit constructor in D2 to prevent copying

Members

Aliases

ElementType
alias ElementType = ubyte

Mixin appropriate API based on kind of element type requested

ElementType
alias ElementType = T
Undocumented in source.
ElementType
alias ElementType = T
Undocumented in source.
opAssign
alias opAssign = Impl.opAssign

Add opAssign from currently used implementation to main overload set so that it won't get shadowed by opAssign automatically generated from postblit.

Functions

length
size_t length()
length
void length(size_t new_length)

Resizes buffer and allows memory stomping

opAssign
void opAssign(Buffer!(T) other)
Undocumented in source.
opSlice
inout(T[]) opSlice(size_t begin, size_t end)

Exposes owned data as an array slice

opSlice
inout(T[]) opSlice()

Exposes owned data as an array slice

reserve
void reserve(size_t new_length)

Ensures buffer has enough capacity to hold specified length but does not modify effective length.

reset
void reset()

More readable alias for resetting buffer length to 0 while preserving capacity.

Mixins

Impl
mixin VoidBufferImpl Impl
Undocumented in source.
Impl
mixin NoIndirectionsBufferImpl Impl
Undocumented in source.
Impl
mixin WithIndirectionsBufferImpl Impl
Undocumented in source.

Mixed In Members

From mixin VoidBufferImpl Impl

opAssign
void opAssign(void[] rhs)

Assigns data to stored data from other slice

opSliceAssign
void opSliceAssign(void[] rhs, ptrdiff_t begin, ptrdiff_t end)

Assigns data to stored data from other slice

opIndex
ubyte* opIndex(size_t i)

Individual element access.

opIndexAssign
void opIndexAssign(ubyte value, size_t i)

Invidual element assignment

opOpAssign
void opOpAssign(ubyte rhs)
void opOpAssign(ubyte[] rhs)

Appends to current buffer

opApply
int opApply(int delegate(ref const(ubyte)) dg)

Buffer element iteration

opApply
int opApply(int delegate(ref size_t, ref const(ubyte)) dg)

Buffer element iteration (with index)

From mixin NoIndirectionsBufferImpl Impl

opAssign
void opAssign(T[] rhs)

Assigns data to stored data from other slice

opSliceAssign
void opSliceAssign(T[] rhs, ptrdiff_t begin, ptrdiff_t end)

Assigns data to stored data from other slice

opSliceAssign
void opSliceAssign(T rhs, ptrdiff_t begin, ptrdiff_t end)

Sets all elements of internal slice to rhs

opIndex
T* opIndex(size_t i)

Individual element access.

opIndexAssign
void opIndexAssign(T value, size_t i)

Invidual element assignment

opOpAssign
void opOpAssign(T rhs)
void opOpAssign(T[] rhs)

Appends to current buffer

opApply
int opApply(int delegate(ref const(T)) dg)

Buffer element iteration

opApply
int opApply(int delegate(ref size_t, ref const(T)) dg)

Buffer element iteration (with index)

From mixin WithIndirectionsBufferImpl Impl

opAssign
void opAssign(T[] rhs)

Assigns data to stored data from other slice

opSliceAssign
void opSliceAssign(U[] rhs, ptrdiff_t begin, ptrdiff_t end)

Assigns data to stored data from other slice

opIndex
T* opIndex(size_t i)

Individual element access.

opIndexAssign
void opIndexAssign(T value, size_t i)

Invidual element assignment

opOpAssign
void opOpAssign(T rhs)
void opOpAssign(T[] rhs)

Appends to current buffer

opApply
int opApply(int delegate(ref T) dg)

Buffer element iteration

opApply
int opApply(int delegate(ref size_t, ref T) dg)

Buffer element iteration (with index)

Meta