Struct MovingBuffer
A buffer that relies on moving chunks of data in memory to ensure that contiguous slices of any requested size can always be provided.
Methods
Name | Description |
---|---|
alloc
|
Allocates space for at least
new objects of type T to be written to the buffer.
|
commit
|
Adds first
objects of type T stored in the slice previously obtained using .
|
consume
|
Removes first n objects of type T from the buffer.
|
peek
|
Returns a read-only slice, typed as const(T)[] , containing all data currently available in the buffer.
|
Parameters
Name | Description |
---|---|
Allocator | Allocator used for internal storage allocation. |
Authors
Copyright
© 2016 Adrian Matoga