Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub fn into_vec(self) -> Vec<T, A>
Consumes the BinaryHeap and returns the underlying vector in arbitrary order.
method alloc Stable since 1.5.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn into_sorted_vec(self) -> Vec<T, A>
Consumes the BinaryHeap and returns a vector in sorted (ascending) order.
method alloc Stable since 1.5.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn drain(&mut self) -> Drain<'_, T, A>
Clears the binary heap, returning an iterator over the removed elements in arbitrary order. If the iterator is dropped before being fully consumed, it drops the remaining elements in arbitrary order.
method alloc Stable since 1.6.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn clear(&mut self)
Drops all items from the binary heap.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn capacity(&self) -> usize
Returns the number of elements the binary heap can hold without reallocating.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn as_slice(&self) -> &[T]
Returns a slice of all values in the underlying vector, in arbitrary order.
method alloc Stable since 1.80.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn append(&mut self, other: &mut Self)
Moves all the elements of other into self, leaving other empty.
method alloc Stable since 1.11.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct BinaryHeap<T, A>
A priority queue implemented with a binary heap.
struct alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub mod binary_heap
A priority queue implemented with a binary heap.
module alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct TryReserveError
The error type for try_reserve methods.
struct alloc Stable since 1.57.0 Version 1.100.0-nightly
doc.rust-lang.org
pub mod collections
Collection types.
module alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn as_slice(&self) -> &[T]
Returns an immutable slice of all elements that have not been yielded yet.
method alloc Stable since 1.100.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn as_mut_slice(&mut self) -> &mut [T]
Returns a mutable slice of all elements that have not been yielded yet.
method alloc Stable since 1.100.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct BoxedArrayIntoIter<T, const N: usize, A>
A by-value Box<[T; N]> iterator.
struct alloc Stable since 1.100.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn write(boxed: Self, value: T) -> Box<T, A>
Writes the value and converts to Box<T, A>.
associated_function alloc Stable since 1.87.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn pin(x: T) -> Pin<Box<T>>
Constructs a new Pin<Box<T>>. If T does not implement Unpin, then x will be pinned in memory and unable to be moved.
associated_function alloc Stable since 1.33.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn new_zeroed_slice(len: usize) -> Box<[mem::MaybeUninit<T>]>
Constructs a new boxed slice with uninitialized contents, with the memory being filled with 0 bytes.
associated_function alloc Stable since 1.92.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn new_zeroed() -> Box<mem::MaybeUninit<T>>
Constructs a new Box with uninitialized contents, with the memory being filled with 0 bytes.
associated_function alloc Stable since 1.92.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn new_uninit_slice(len: usize) -> Box<[mem::MaybeUninit<T>]>
Constructs a new boxed slice with uninitialized contents.
associated_function alloc Stable since 1.82.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn new_uninit() -> Box<mem::MaybeUninit<T>>
Constructs a new box with uninitialized contents.
associated_function alloc Stable since 1.82.0 Version 1.100.0-nightly
"Things that are programming patterns in C are types in Rust."

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.