pub struct Circular;Expand description
Builder for the non-blocking circular buffer implementation.
Implementations§
Source§impl Circular
impl Circular
Sourcepub fn new<T>() -> Result<Writer<T>, CircularError>
pub fn new<T>() -> Result<Writer<T>, CircularError>
Create a buffer for items of type T with minimal capacity (usually a page size).
The actual size is the least common multiple of the page size and the size of T.
Sourcepub fn with_capacity<T>(min_items: usize) -> Result<Writer<T>, CircularError>
pub fn with_capacity<T>(min_items: usize) -> Result<Writer<T>, CircularError>
Create a buffer that can hold at least min_items items of type T.
The size is the least common multiple of the page size and the size of T.
Auto Trait Implementations§
impl Freeze for Circular
impl RefUnwindSafe for Circular
impl Send for Circular
impl Sync for Circular
impl Unpin for Circular
impl UnwindSafe for Circular
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