Trait HasPeekBehavior

Source
pub trait HasPeekBehavior<E: Element>: QueueBehavior<E> {
    // Required method
    fn peek(&self) -> Result<Option<E>>;
}

Required Methods§

Source

fn peek(&self) -> Result<Option<E>>

Gets the head of the queue, but does not delete it. Returns None if the queue is empty.
キューの先頭を取得しますが、削除しません。キューが空の場合は None を返します。

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<E: Element + 'static> HasPeekBehavior<E> for QueueVec<E>