pub struct CircularBuffer { /* private fields */ }Expand description
A fixed-capacity circular (ring) buffer backed by a flat array.
Supports O(1) push-front, push-back, pop-front, and pop-back. Useful for implementing deques and sliding-window algorithms.
Implementations§
Auto Trait Implementations§
impl Freeze for CircularBuffer
impl RefUnwindSafe for CircularBuffer
impl Send for CircularBuffer
impl Sync for CircularBuffer
impl Unpin for CircularBuffer
impl UnsafeUnpin for CircularBuffer
impl UnwindSafe for CircularBuffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more