A resizable ring buffer.
struct DynRingBuf<T, Heap = Libc>
where Heap: Allocator,
{
/* private fields */
}| Name | Description |
|---|---|
| buffered | Creates a ring buffer which is backed by borrowed memory. |
| new | Creates a new ring buffer. |
| with_capacity | Creates a new ring buffer and reserves a certain amount of space for it. |
| with_pool | Creates a new ring buffer with a memory pool. |
| Receiver | Name | Description |
|---|---|---|
&self | available | Returns the number of available but unused slots. |
&self | capacity | Returns the capacity of the ring buffer. |
&mut self | clear | |
&self | iter | Creates an iterator over the elements in the ringbuffer. |
&self | len | Returns the number of elements in the ring buffer. |
&mut self | pop_left | Removes an element from the left end of the ring buffer. |
&mut self | pop_right | Removes an element from the rght end of the ring buffer. |
&mut self | push_left | Appends an element to the left end of the ring buffer. |
&mut self | push_right | Appends an element to the right end of the ring buffer. |
&mut self | reserve | Reserves memory for additional elements. |
&mut self | try_push_left | Tries to append an element to the right end of the ring buffer. |
&mut self | try_push_right | Tries to append an element to the right end of the ring buffer. |
| Name | Description |
|---|---|
| Debug | Objects that can be formatted in a "debug" form. |
| Drop | Objects with a destructor. |
| Eq (2 times) | Objects that implement the binary |
| Index | Objects that implement the immutable subscript operator. |
| IndexMut | Objects that implement the mutable subscript operator. |
| MaybeClone | Objects that can be duplicated. |
| Send | Objects whose ownership can be moved from one thread to another. |
| Sync | Objects that allow immutable access from threads other than their owning thread. |
| UndefState | Types that are not valid when they contain certain bit patterns. |