Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub fn as_mut_slices(&mut self) -> (&mut [T], &mut [T])
Returns a pair of slices which contain, in order, the contents of the deque.
method alloc Stable since 1.5.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn as_slices(&self) -> (&[T], &[T])
Returns a pair of slices which contain, in order, the contents of the deque.
method alloc Stable since 1.5.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn back(&self) -> Option<&T>
Provides a reference to the back element, or None if the deque is empty.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn back_mut(&mut self) -> Option<&mut T>
Provides a mutable reference to the back element, or None if the deque is empty.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn binary_search(&self, x: &T) -> Result<usize, usize>
Binary searches this VecDeque for a given element. If the VecDeque is not sorted, the returned result is unspecified and meaningless.
method alloc Stable since 1.54.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>
Binary searches this VecDeque with a comparator function.
method alloc Stable since 1.54.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn binary_search_by_key<'a, B, F>(&'a self, b: &B, f: F) -> Result<usize, usize>
Binary searches this VecDeque with a key extraction function.
method alloc Stable since 1.54.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn capacity(&self) -> usize
Returns the number of elements the deque can hold without reallocating.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn clear(&mut self)
Clears the deque, removing all values.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn contains(&self, x: &T) -> bool
Returns true if the deque contains an element equal to the given value.
method alloc Stable since 1.12.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn drain<R>(&mut self, range: R) -> Drain<'_, T, A>
Removes the specified range from the deque in bulk, returning all removed elements as an iterator. If the iterator is dropped before being fully consumed, it drops the remaining removed elements.
method alloc Stable since 1.6.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn front(&self) -> Option<&T>
Provides a reference to the front element, or None if the deque is empty.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn front_mut(&mut self) -> Option<&mut T>
Provides a mutable reference to the front element, or None if the deque is empty.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn get(&self, index: usize) -> Option<&T>
Provides a reference to the element at the given index.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn get_mut(&mut self, index: usize) -> Option<&mut T>
Provides a mutable reference to the element at the given index.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn insert(&mut self, index: usize, value: T)
Inserts an element at index within the deque, shifting all elements with indices greater than or equal to index towards the back.
method alloc Stable since 1.5.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn insert_mut(&mut self, index: usize, value: T) -> &mut T
Inserts an element at index within the deque, shifting all elements with indices greater than or equal to index towards the back, and returning a reference to it.
method alloc Stable since 1.95.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn is_empty(&self) -> bool
Returns true if the deque is empty.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn iter(&self) -> Iter<'_, T>
Returns a front-to-back iterator.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn iter_mut(&mut self) -> IterMut<'_, T>
Returns a front-to-back iterator that returns mutable references.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
"I'm not here to tell you that Rust is the best language....... you should have figured that out by now."

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.