pub trait QueueBase<E: Element>:
Debug
+ Send
+ Sync {
// Required methods
fn len<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = QueueSize> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn capacity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = QueueSize> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn is_empty<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn non_empty<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn is_full<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn non_full<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
A trait that defines the behavior of a queue.
キューの振る舞いを定義するトレイト。
Required Methods§
Sourcefn len<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = QueueSize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn len<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = QueueSize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the length of this queue.
このキューの長さを返します。
§Return Value / 戻り値
QueueSize::Limitless- If the queue has no capacity limit. / キューに容量制限がない場合。QueueSize::Limited(num)- If the queue has a capacity limit. / キューに容量制限がある場合。
Sourcefn capacity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = QueueSize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn capacity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = QueueSize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the capacity of this queue.
このキューの最大容量を返します。
§Return Value / 戻り値
QueueSize::Limitless- If the queue has no capacity limit. / キューに容量制限がない場合。QueueSize::Limited(num)- If the queue has a capacity limit. / キューに容量制限がある場合。
Provided Methods§
Sourcefn is_empty<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_empty<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns whether this queue is empty.
このキューが空かどうかを返します。
§Return Value / 戻り値
true- If the queue is empty. / キューが空の場合。false- If the queue is not empty. / キューが空でない場合。
Sourcefn non_empty<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn non_empty<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns whether this queue is non-empty.
このキューが空でないかどうかを返します。
§Return Value / 戻り値
true- If the queue is not empty. / キューが空でない場合。false- If the queue is empty. / キューが空の場合。
Sourcefn is_full<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_full<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns whether the queue size has reached its capacity.
このキューのサイズが容量まで到達したかどうかを返します。
§Return Value / 戻り値
true- If the queue size has reached its capacity. / キューのサイズが容量まで到達した場合。false- If the queue size has not reached its capacity. / キューのサイズが容量まで到達してない場合。
Sourcefn non_full<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn non_full<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns whether the queue size has not reached its capacity.
このキューのサイズが容量まで到達してないかどうかを返します。
§Return Value / 戻り値
true- If the queue size has not reached its capacity. / キューのサイズが容量まで到達してない場合。false- If the queue size has reached its capacity. / キューのサイズが容量まで到達した場合。
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".