Skip to main content

InfrastructureQueue

Trait InfrastructureQueue 

Source
pub trait InfrastructureQueue<T>{
    // Required methods
    fn queue(&self) -> &VecDeque<T>;
    fn queue_mut(&mut self) -> &mut VecDeque<T>;

    // Provided methods
    fn process(&mut self, workforce: Workforce) -> Vec<T> { ... }
    fn iter<'a>(&'a self) -> impl Iterator<Item = &'a T>
       where T: 'a { ... }
    fn len(&self) -> usize { ... }
    fn is_empty(&self) -> bool { ... }
    fn sum_pending_workforce(&self) -> Workforce { ... }
}

Required Methods§

Source

fn queue(&self) -> &VecDeque<T>

Source

fn queue_mut(&mut self) -> &mut VecDeque<T>

Provided Methods§

Source

fn process(&mut self, workforce: Workforce) -> Vec<T>

Consumes workforce until it runs out or the entire queue is completed.

Source

fn iter<'a>(&'a self) -> impl Iterator<Item = &'a T>
where T: 'a,

Source

fn len(&self) -> usize

Source

fn is_empty(&self) -> bool

Source

fn sum_pending_workforce(&self) -> Workforce

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§