pub struct TQueue<T> { /* private fields */ }
Expand description
Unbounded queue using two vectors.
This implementation writes to one vector and reads from the other until the reads vector becomes empty and the two need to be swapped. Again reads don’t block writes most of the time. It has an amortised cost of O(1).
Implementations§
Trait Implementations§
Source§impl<T> TQueueLike<T> for TQueue<T>
impl<T> TQueueLike<T> for TQueue<T>
Auto Trait Implementations§
impl<T> Freeze for TQueue<T>
impl<T> !RefUnwindSafe for TQueue<T>
impl<T> Send for TQueue<T>where
T: Send,
impl<T> Sync for TQueue<T>where
T: Sync,
impl<T> Unpin for TQueue<T>where
T: Unpin,
impl<T> !UnwindSafe for TQueue<T>
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