Struct cbuf::CBufControl
[−]
[src]
pub struct CBufControl<T> { // some fields omitted }
Circular Buffer Control
Implements the actual logic of Circular Buffer, but requires passing &[T]
to get
and put
.
Useful for operating on a raw slice, without allocating new Vec
.
Methods
impl<T: CopyOrClone> CBufControl<T>
[src]
fn new() -> CBufControl<T>
fn is_empty(&self) -> bool
See corresponding method of CBuf
fn is_full(&self) -> bool
See corresponding method of CBuf
fn get(&mut self, buf: &[T]) -> Option<T>
See corresponding method of CBuf
fn get_unchecked(&mut self, buf: &[T]) -> T
See corresponding method of CBuf
fn peek(&mut self, buf: &[T]) -> Option<T>
See corresponding method of CBuf
fn peek_unchecked(&mut self, buf: &[T]) -> T
See corresponding method of CBuf
fn put(&mut self, buf: &mut [T], val: T)
See corresponding method of CBuf
fn put_unchecked(&mut self, buf: &mut [T], val: T)
See corresponding method of CBuf