Enum Queue

Source
pub enum Queue<T> {
    Vec(QueueVec<T>),
    MPSC(QueueMPSC<T>),
}

Variants§

§

Vec(QueueVec<T>)

§

MPSC(QueueMPSC<T>)

Implementations§

Source§

impl<T: Element + 'static> Queue<T>

Source

pub fn with_blocking(self) -> BlockingQueue<T, Queue<T>>

Trait Implementations§

Source§

impl<T: Clone> Clone for Queue<T>

Source§

fn clone(&self) -> Queue<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for Queue<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Element + 'static> QueueBehavior<T> for Queue<T>

Source§

fn len(&self) -> QueueSize

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

fn capacity(&self) -> QueueSize

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

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>>

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

fn is_empty(&self) -> bool

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

fn non_empty(&self) -> bool

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

fn is_full(&self) -> bool

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

fn non_full(&self) -> bool

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

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.