#queue #length #display #remove #first #add #colas

PitosMarcianosSalamanca

Colas tarea

2 releases

0.1.1 Oct 4, 2023
0.1.0 Oct 4, 2023

#58 in #remove

MIT license

6KB
103 lines

Rust Queue Implementation

This is an example of implementing a queue in Rust using std::collections::VecDeque. The queue allows you to add and remove items, as well as display relevant information about their current status.

Features

  • Add a value to the queue: Allows the user to add a value to the queue.
  • Remove a value from the queue: Removes the first value from the queue.
  • Show first value: Displays the first value in the queue.
  • Show Queue Length: Shows the current length of the queue.
  • Show Queue Values: Displays all values ​​present in the queue.

Execution

Make sure you have Rust installed on your system. To compile and run the code, use the following command in your terminal:

cargo run

Here was used this crate :  https://crates.io/crates/dummy-queue 

No runtime deps