Buffer

Undocumented in source.

Constructors

this
this(ubyte[] buf)
Undocumented in source.
this
this(size_t initial, bool _use_secure_mem, bool _zeroise_on_free)
Undocumented in source.

Members

Functions

free
void free()
Undocumented in source. Be warned that the author may not have intended to support it.
opSlice
ubyte[] opSlice()
Undocumented in source. Be warned that the author may not have intended to support it.
reserve
void reserve(size_t new_cap)
Undocumented in source. Be warned that the author may not have intended to support it.
reset
void reset()

Resets pos, last, mark member of |buf| to buf.begin.

shiftLeft
void shiftLeft(size_t amount)
Undocumented in source. Be warned that the author may not have intended to support it.
shiftRight
void shiftRight(size_t amount)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

available
int available [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
capacity
int capacity [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
length
int length [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
markAvailable
int markAvailable [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
offset
int offset [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
posOffset
int posOffset [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

begin
ubyte* begin;

This points to the beginning of the buffer. The effective range of buffer is [begin, end).

end
ubyte* end;

This points to the memory one byte beyond the end of the buffer.

last
ubyte* last;

The position indicator for effective one beyond of the end of the buffer. last <= end must be hold.

mark
ubyte* mark;

Mark arbitrary position in buffer [begin, end)

pos
ubyte* pos;

The position indicator for effective start of the buffer. pos <= last must be hold.

use_secure_mem
bool use_secure_mem;

true if the allocator must be secure

zeroize_on_free
bool zeroize_on_free;

true if the memory much be manually freed. use_secure_mem can be false if this is true

Meta