vibe.d beta banner
get vibe.d
0.8.4

Asynchronous I/O that doesn’t get in your way, written in D

Struct FixedRingBuffer

struct FixedRingBuffer(T, ulong N = 0, bool INITIALIZE = true) ;

Constructors

NameDescription
this

Fields

NameTypeDescription
m_buffer T[N]
m_fill size_t
m_start size_t

Properties

NameTypeDescription
back[get] inout(T)
capacity[get] size_t
capacity[set] size_t
empty[get] bool
freeSpace[get] size_t
front[get] inout(T)
full[get] bool
length[get] size_t

Methods

NameDescription
clear
dispose Resets the capacity to zero and explicitly frees the memory for the buffer.
mod
opApply
opApply iterate through elements with index
opDollar
opIndex
opSlice
opSlice
peek
peekDst
popBack
popBackN
popFront
popFrontN
putBack
putBack
putBackN
putFront
read
removeAt

Inner structs

NameDescription
Range

Aliases

NameDescription
put
putN

TODO

clear ring buffer fields upon removal (to run struct destructors, if T is a struct)

Authors

Sönke Ludwig

Copyright

© 2012 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.