pub type Queue<T> = VecDeque<T>;Expand description
§FIFO
This sequencer is used for the BFS (Breadth-First-Search) algorithm.
Aliased Type§
pub struct Queue<T> { /* private fields */ }Trait Implementations§
Source§impl<T> NodeSequencer<T> for Queue<T>
impl<T> NodeSequencer<T> for Queue<T>
Source§fn is_ordered(&self) -> bool
fn is_ordered(&self) -> bool
Returns true if the sequence is ordered and minimum/maximum matter.
Source§fn init(item: T) -> Self
fn init(item: T) -> Self
Initializes the sequencer with a starting object as the first element.
Source§fn pop(&mut self) -> Option<T>
fn pop(&mut self) -> Option<T>
Pops the highest-order-priority element from the sequencer and returns it as an
Option<T>.
Returns None if the sequencer was empty.Source§fn to_vec(self) -> Vec<T>
fn to_vec(self) -> Vec<T>
Consumes the sequencer and returns a
Vec<T> with all remaining objects in the sequencer.Source§fn from_vec(items: Vec<T>) -> Self
fn from_vec(items: Vec<T>) -> Self
Creates a sequencer from a
Vec<T>.
Note that elements will most likely be pushed into the sequencer in the given order in the vector.Source§fn convert_from<S>(other: S) -> Selfwhere
S: NodeSequencer<T>,
fn convert_from<S>(other: S) -> Selfwhere
S: NodeSequencer<T>,
Consumes a foreign sequencer to create a new sequencer of this type. Read more