Struct kernel::common::queue::Queue [] [src]

pub struct Queue<T> {
    pub vec: Vec<T>,
}

A FIFO Queue

Fields

vec

The queue as a vector

Methods

impl<T> Queue<T>

fn new() -> Self

Create new queue

fn push(&mut self, value: T)

Push element to queue

fn pop(&mut self) -> Option<T>

Pop the last element

fn len(&self) -> usize

Get the length of the queue

Trait Implementations

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

fn clone(&self) -> Self

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