pub trait BlockingQueueBase<E: Element>: QueueBase<E> + Send {
// Required methods
fn remaining_capacity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = QueueSize> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn is_interrupted<'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 blocking queue.
ブロッキングキューの振る舞いを定義するトレイト。
Required Methods§
Sourcefn remaining_capacity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = QueueSize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remaining_capacity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = QueueSize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the number of elements that can be inserted into this queue without blocking.
ブロックせずにこのキューに挿入できる要素数を返します。
§Return Value / 戻り値
QueueSize::Limitless- If the queue has no capacity limit. / キューに容量制限がない場合。QueueSize::Limited(num)- If the queue has a capacity limit. / キューに容量制限がある場合。
Sourcefn is_interrupted<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_interrupted<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns whether the operation of this queue has been interrupted.
このキューの操作が中断されたかどうかを返します。
§Return Value / 戻り値
true- If the operation is interrupted. / 操作が中断された場合。false- If the operation is not interrupted. / 操作が中断されていない場合。
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".