pub enum Queue<T> {
Vec(QueueVec<T>),
MPSC(QueueMPSC<T>),
}
Variants§
Implementations§
Source§impl<T: Element + 'static> Queue<T>
impl<T: Element + 'static> Queue<T>
pub fn with_blocking(self) -> BlockingQueue<T, Queue<T>>
Trait Implementations§
Source§impl<T: Element + 'static> QueueBehavior<T> for Queue<T>
impl<T: Element + 'static> QueueBehavior<T> for Queue<T>
Source§fn offer(&mut self, e: T) -> Result<()>
fn offer(&mut self, e: T) -> Result<()>
The specified element will be inserted into this queue,
if the queue can be executed immediately without violating the capacity limit.
容量制限に違反せずにすぐ実行できる場合は、指定された要素をこのキューに挿入します。
容量制限に違反せずにすぐ実行できる場合は、指定された要素をこのキューに挿入します。
Source§fn poll(&mut self) -> Result<Option<T>>
fn poll(&mut self) -> Result<Option<T>>
Retrieves and deletes the head of the queue. Returns None if the queue is empty.
キューの先頭を取得および削除します。キューが空の場合は None を返します。
キューの先頭を取得および削除します。キューが空の場合は None を返します。
Auto Trait Implementations§
impl<T> Freeze for Queue<T>
impl<T> RefUnwindSafe for Queue<T>
impl<T> Send for Queue<T>where
T: Send,
impl<T> Sync for Queue<T>where
T: Send,
impl<T> Unpin for Queue<T>
impl<T> UnwindSafe for Queue<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