pub enum BlockingQueueAdapter<E>{
BlockingQueue {
blocking_queue: BlockingQueue<E>,
},
CrossbeamBlockingQueue {
crossbeam_blocking_queue: CrossbeamBlockingQueue<E>,
},
}
Expand description
Wrapper over available queue types.
Variants§
BlockingQueue
Fields
§
blocking_queue: BlockingQueue<E>
CrossbeamBlockingQueue
Fields
§
crossbeam_blocking_queue: CrossbeamBlockingQueue<E>
Implementations§
Source§impl<E> BlockingQueueAdapter<E>
impl<E> BlockingQueueAdapter<E>
pub fn new(queue_type: QueueType, size: usize) -> BlockingQueueAdapter<E>
pub fn len(&self) -> usize
pub fn capacity(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn is_full(&self) -> bool
pub fn wait_empty(&self, timeout: Duration) -> bool
pub fn enqueue(&self, element: E)
pub fn try_enqueue(&self, element: E, timeout: Duration) -> Option<E>
pub fn dequeue(&self) -> Option<E>
pub fn try_dequeue(&self, timeout: Duration) -> Option<E>
Auto Trait Implementations§
impl<E> !Freeze for BlockingQueueAdapter<E>
impl<E> !RefUnwindSafe for BlockingQueueAdapter<E>
impl<E> Send for BlockingQueueAdapter<E>
impl<E> Sync for BlockingQueueAdapter<E>
impl<E> Unpin for BlockingQueueAdapter<E>where
E: Unpin,
impl<E> !UnwindSafe for BlockingQueueAdapter<E>
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