Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub struct OccupiedEntry<'a, K, V, A>
A view into an occupied entry in a BTreeMap. It is part of the Entry enum.
struct alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn get(&self) -> &V
Gets a reference to the value in the entry.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn get_mut(&mut self) -> &mut V
Gets a mutable reference to the value in the entry.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn insert(&mut self, value: V) -> V
Sets the value of the entry with the OccupiedEntry's key, and returns the entry's old value.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn into_mut(self) -> &'a mut V
Converts the entry into a mutable reference to its value.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn key(&self) -> &K
Gets a reference to the key in the entry.
method alloc Stable since 1.10.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn remove(self) -> V
Takes the value of the entry out of the map, and returns it.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn remove_entry(self) -> (K, V)
Take ownership of the key and value from the map.
method alloc Stable since 1.12.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct VacantEntry<'a, K, V, A>
A view into a vacant entry in a BTreeMap. It is part of the Entry enum.
struct alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn insert(self, value: V) -> &'a mut V
Sets the value of the entry with the VacantEntry's key, and returns a mutable reference to it.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V, A>
Sets the value of the entry with the VacantEntry's key, and returns an OccupiedEntry.
method alloc Stable since 1.92.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn into_key(self) -> K
Take ownership of the key.
method alloc Stable since 1.12.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn key(&self) -> &K
Gets a reference to the key that would be used when inserting a value through the VacantEntry.
method alloc Stable since 1.10.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct BTreeSet<T, A>
An ordered set based on a B-Tree.
struct 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 fn clear(&mut self)
Clears the set, removing all elements.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn contains<Q>(&self, value: &Q) -> bool
Returns true if the set contains an element equal to the value.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn difference<'a>(&'a self, other: &'a BTreeSet<T, A>) -> Difference<'a, T, A>
Visits the elements representing the difference, i.e., the elements that are in self but not in other, in ascending order.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn extract_if<F, R>(&mut self, range: R, pred: F) -> ExtractIf<'_, T, R, F, A>
Creates an iterator that visits elements in the specified range in ascending 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 first(&self) -> Option<&T>
Returns a reference to the first element in the set, if any. This element is always the minimum of all elements in the set.
method alloc Stable since 1.66.0 Version 1.100.0-nightly
"Compilers are an error reporting tool with a code generation side-gig."

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.