Skip to content

Glossary: Rust Basics

get

Also written: get()

A method on `Vec` and `HashMap` that looks up an item and returns an `Option`, so a missing position or key gives `None` instead of a panic.

Where the book teaches it

Related terms

OptionVecHashMapIndex