pub struct BoundedQueue<T> { /* private fields */ }Implementations§
Source§impl<T> BoundedQueue<T>
impl<T> BoundedQueue<T>
pub fn new(cap: usize) -> Self
pub fn capacity(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn is_full(&self) -> bool
pub fn push(&mut self, item: T) -> Result<(), T>
pub fn pop(&mut self) -> Option<T>
Sourcepub fn pop_back(&mut self) -> Option<T>
pub fn pop_back(&mut self) -> Option<T>
Remove and return the most-recently-enqueued element, if any.
Used by [OverflowStrategy::DropTail].
pub fn push_front(&mut self, item: T) -> Result<(), T>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for BoundedQueue<T>
impl<T> RefUnwindSafe for BoundedQueue<T>where
T: RefUnwindSafe,
impl<T> Send for BoundedQueue<T>where
T: Send,
impl<T> Sync for BoundedQueue<T>where
T: Sync,
impl<T> Unpin for BoundedQueue<T>where
T: Unpin,
impl<T> UnsafeUnpin for BoundedQueue<T>
impl<T> UnwindSafe for BoundedQueue<T>where
T: UnwindSafe,
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