std-method

VecDeque::push_back

Append an owned value at the back. This is the insertion end of a conventional FIFO queue when removal uses pop_front. Expected stdout (not executed): Some("A") Common mistake: Using push_front when new jobs should wait behind existing jobs.

Formal Syntax & Structure

rust syntaxrust
pub fn push_back(&mut self, value: T)

Working Example

Example Snippetrust
fn main() {    use std::collections::VecDeque;    let mut q = VecDeque::from(["A"]);    q.push_back("B");    println!("{:?}", q.front());}
Rust Reference