pub trait QueueBehavior<E>: Send + Sized {
    fn len(&self) -> QueueSize;
    fn capacity(&self) -> QueueSize;
    fn offer(&mut self, e: E) -> Result<()>;
    fn poll(&mut self) -> Result<Option<E>>;

    fn is_empty(&self) -> bool { ... }
    fn non_empty(&self) -> bool { ... }
    fn is_full(&self) -> bool { ... }
    fn non_full(&self) -> bool { ... }
}

Required Methods

Returns the length of this queue.
このキューの長さを返します。

Returns the capacity of this queue.
このキューの最大容量を返します。

The specified element will be inserted into this queue, if the queue can be executed immediately without violating the capacity limit.
容量制限に違反せずにすぐ実行できる場合は、指定された要素をこのキューに挿入します。

Retrieves and deletes the head of the queue. Returns None if the queue is empty.
キューの先頭を取得および削除します。キューが空の場合は None を返します。

Provided Methods

Returns whether this queue is empty.
このキューが空かどうかを返します。

Returns whether this queue is non-empty.
このキューが空でないかどうかを返します。

Returns whether the queue size has reached its capacity.
このキューのサイズが容量まで到達したかどうかを返します。

Returns whether the queue size has not reached its capacity.
このキューのサイズが容量まで到達してないかどうかを返します。

Implementors