Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub fn retain_back(&mut self, len: usize)
Shortens the deque, keeping the last len elements and dropping the rest.
method alloc Stable since 1.100.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn retain_mut<F>(&mut self, f: F)
Retains only the elements specified by the predicate.
method alloc Stable since 1.61.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn rotate_left(&mut self, n: usize)
Rotates the double-ended queue n places to the left.
method alloc Stable since 1.36.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn rotate_right(&mut self, n: usize)
Rotates the double-ended queue n places to the right.
method alloc Stable since 1.36.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn shrink_to(&mut self, min_capacity: usize)
Shrinks the capacity of the deque with a lower bound.
method alloc Stable since 1.56.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn shrink_to_fit(&mut self)
Shrinks the capacity of the deque as much as possible.
method alloc Stable since 1.5.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn split_off(&mut self, at: usize) -> Self
Splits the deque into two at the given index.
method alloc Stable since 1.4.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn swap(&mut self, i: usize, j: usize)
Swaps elements at indices i and j.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn swap_remove_back(&mut self, index: usize) -> Option<T>
Removes an element from anywhere in the deque and returns it, replacing it with the last element.
method alloc Stable since 1.5.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn swap_remove_front(&mut self, index: usize) -> Option<T>
Removes an element from anywhere in the deque and returns it, replacing it with the first element.
method alloc Stable since 1.5.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn truncate(&mut self, len: usize)
Shortens the deque, keeping the first len elements and dropping the rest.
method alloc Stable since 1.16.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
Tries to reserve capacity for at least additional more elements to be inserted in the given deque. The collection may reserve more space to speculatively avoid frequent reallocations. After calling try_reserve, capacity will be greater than or equal to self.len() + additional if it returns Ok(()). Does nothing if capacity is already sufficient. This method preserves the contents even if an error occurs.
method alloc Stable since 1.57.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn try_reserve_exact(&mut self, additional: usize) -> Result<(), TryReserveError>
Tries to reserve the minimum capacity for at least additional more elements to be inserted in the given deque. After calling try_reserve_exact, capacity will be greater than or equal to self.len() + additional if it returns Ok(()). Does nothing if the capacity is already sufficient.
method alloc Stable since 1.57.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn with_capacity(capacity: usize) -> VecDeque<T>
Creates an empty deque with space for at least capacity elements.
associated_function alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct Drain<'a, T, A>
A draining iterator over the elements of a VecDeque.
struct alloc Stable since 1.6.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct IntoIter<T, A>
An owning iterator over the elements of a VecDeque.
struct alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct Iter<'a, T>
An iterator over the elements of a VecDeque.
struct alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct IterMut<'a, T>
A mutable iterator over the elements of a VecDeque.
struct alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub mod ffi
Utilities related to FFI bindings.
module alloc Stable since 1.64.0 Version 1.100.0-nightly
doc.rust-lang.org
pub mod c_str
CString and its related types.
module alloc Stable since 1.88.0 Version 1.100.0-nightly
"Abomonation has no safe methods. […] If you are concerned about safety, it may be best to avoid Abomonation all together. It does several things tha..."

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.