Trait indicator::ticked::tumbling::queue::QueueCapAtLeast[][src]

pub trait QueueCapAtLeast<const LEN: usize> {
    type Item;
    fn empty() -> Self;
fn len(&self) -> usize;
fn deque(&mut self) -> Option<Self::Item>;
fn enque(&mut self, item: Self::Item);
fn get_latest(&self, n: usize) -> Option<&Self::Item>; fn is_reach(&self) -> bool { ... }
fn enque_and_deque_overflow(
        &mut self,
        item: Self::Item
    ) -> Option<Self::Item> { ... } }
Expand description

Queue that can hold at least LEN items.

Associated Types

Item type.

Required methods

Creat an empty queue.

Get the nubmer of items in queue.

Deque an item.

Enque a new item.

Get the nth latest item.

The index is starting from 0.

Provided methods

Tumbling full.

Push a new item and return the oldest item if full.

Implementations on Foreign Types

Implementors