Rust Collections

moha230's avatar
Published Mar 6, 2024
Contribute to Docs

In Rust, collections are fundamental data structures offered by the standard library, enabling the storage and manipulation of multiple values. These dynamic structures differ from fixed-size arrays and tuples by allowing a variable number of elements. The key advantage lies in their ability to dynamically allocate memory on the heap, which means that the amount of data does not need to be known at compile time and can shrink and grow during runtime. The most commonly used collection data types include vector, string, and Hashmap. The rest include VecDeque, LinkedList, BTreeMap, set, and BinaryHeap.

  • Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
    • Includes 6 Courses
    • With Professional Certification
    • Beginner Friendly.
      75 hours
  • A quick primer on the fundamentals of the Rust programming language for experienced programmers.
    • Intermediate.
      1 hour

All contributors

Contribute to Docs

Learn Rust on Codecademy

  • Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
    • Includes 6 Courses
    • With Professional Certification
    • Beginner Friendly.
      75 hours
  • A quick primer on the fundamentals of the Rust programming language for experienced programmers.
    • Intermediate.
      1 hour