Source: doc.rust-lang.org (std library reference) · crates.io database dump, 2026-07-25 (crates directory)Contact
R RustDocs Hub Browse all std items A–Z
Reference Guides Tutorials Articles Search

Get started

  • Home
  • All items A-Z 2028
  • Module guides
  • Tutorials

Modules

  • intrinsics343
  • simd267
  • os141
  • sync98
  • collections95
  • iter60
  • mem58
  • ops57
  • io46
  • str46
  • f3241
  • f6441
  • ptr39
  • ffi38
  • slice37
  • fs33
  • env30
  • marker29
  • fmt28
  • f12827
  • f1627
  • thread23
  • num21
  • char19
  • cmp19
  • panic17
  • net16
  • process16
  • alloc15
  • path15
  • hint15
  • prelude15
  • task12
  • cell11
  • future11
  • range11
  • arch10
  • convert9
  • hash8
  • array7
  • string7
  • any6
  • time6
  • vec6
  • error5
  • option5
  • clone5
  • ascii4
  • async_iter4
  • pin4
  • random4
  • result4
  • borrow4
  • backtrace3
  • rc3
  • boxed2
  • bstr2
  • default2
  • unsafe_binder2
  • autodiff2
  • i1282
  • i162
  • i322
  • i642
  • i82
  • isize2
  • u1282
  • u162
  • u322
  • u642
  • u82
  • usize2
  • pat1
  • from1

Browse by kind

  • Structs
  • Enums
  • Traits
  • Functions
  • Macros
  • Type aliases
  • Constants
  • Primitives
Home / Articles / Choosing the Right Collection
ARTICLE

Choosing the Right Collection

When to reach for Vec, when for HashMap, when for BTreeMap, and when for VecDeque.

RustDocs Hub

An independent, annotated reference for the Rust standard library — every struct, every trait, every macro.

Reference

  • All items A-Z
  • collections
  • iter
  • io
  • sync

By kind

  • Structs
  • Traits
  • Enums
  • Functions
  • Macros

Project

  • About
  • What's new
  • Tutorials
  • Articles
  • Privacy
  • Terms
  • Contact
© 2026 RustDocs Hub. Standard-library metadata sourced from doc.rust-lang.org. Built with PHP and Rust on the brain.