Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub fn last_entry(&mut self) -> Option<OccupiedEntry<'_, K, V, A>>
Returns the last entry in the map for in-place manipulation. The key of this entry is the maximum key in the map.
method alloc Stable since 1.66.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn keys(&self) -> Keys<'_, K, V>
Gets an iterator over the keys of the map, in sorted order.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn iter_mut(&mut self) -> IterMut<'_, K, V>
Gets a mutable iterator over the entries of the map, sorted by key.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn iter(&self) -> Iter<'_, K, V>
Gets an iterator over the entries of the map, sorted by key.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_empty(&self) -> bool
Returns true if the map contains no elements.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn into_values(self) -> IntoValues<K, V, A>
Creates a consuming iterator visiting all the values, in order by key. The map cannot be used after calling this. The iterator element type is V.
method alloc Stable since 1.54.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn into_keys(self) -> IntoKeys<K, V, A>
Creates a consuming iterator visiting all the keys, in sorted order. The map cannot be used after calling this. The iterator element type is K.
method alloc Stable since 1.54.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn insert(&mut self, key: K, value: V) -> Option<V>
Inserts a key-value pair into the map.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut V>
Returns a mutable reference to the value corresponding to the key.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn get_key_value<Q>(&self, k: &Q) -> Option<(&K, &V)>
Returns the key-value pair corresponding to the supplied key. This is potentially useful:
method alloc Stable since 1.40.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn get<Q>(&self, key: &Q) -> Option<&V>
Returns a reference to the value corresponding to the key.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn first_key_value(&self) -> Option<(&K, &V)>
Returns the first key-value pair in the map. The key in this pair is the minimum key in the map.
method alloc Stable since 1.66.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn first_entry(&mut self) -> Option<OccupiedEntry<'_, K, V, A>>
Returns the first entry in the map for in-place manipulation. The key of this entry is the minimum key in the map.
method alloc Stable since 1.66.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn extract_if<F, R>(&mut self, range: R, pred: F) -> ExtractIf<'_, K, V, R, F, A>
Creates an iterator that visits elements (key-value pairs) in the specified range in ascending key order and uses a closure to determine if an element should be removed.
method alloc Stable since 1.91.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn entry(&mut self, key: K) -> Entry<'_, K, V, A>
Gets the given key's corresponding entry in the map for in-place manipulation.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn contains_key<Q>(&self, key: &Q) -> bool
Returns true if the map contains a value for the specified key.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn clear(&mut self)
Clears the map, removing all elements.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn append(&mut self, other: &mut Self)
Moves all elements from other into self, leaving other empty.
method alloc Stable since 1.11.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct BTreeMap<K, V, A>
An ordered map based on a B-Tree.
struct alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn pop(this: PeekMut<'a, T, A>) -> T
Removes the peeked value from the heap and returns it.
associated_function alloc Stable since 1.18.0 Version 1.100.0-nightly
"Memory errors are fundamentally state errors, and Rust's move semantics, borrowing, and aliasing XOR mutating help enormously for me to reason about h..."

Search tips

Type anything to search across articles, videos (including conference talks), podcasts, research, crates, and Rust API documentation. These operators give you finer control — click an example to try it.

Find pages containing all your words. Pages where the words appear together rank higher.
Quote part of your query to keep those words together as an exact phrase within a larger search.
Wrap the whole query in quotes for a verbatim search that matches text exactly, punctuation and all — perfect for Rust syntax. Needs at least 3 characters.
Put ! first to open the top result immediately. Quote the whole query for a literal leading bang, as in '!Send'. Bangs elsewhere, such as println!, stay literal. Browser and launcher shortcuts can invoke this directly. See search integrations.
Limit results to a single site. Works on its own () too. One site: per search.

Use the tabs and filters above the results to narrow by content type, publication year, and sort order.