Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub fn downcast<T>(self) -> Result<Box<T, A>, Self>
Attempts to downcast the box to a concrete type.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe fn from_non_null(ptr: NonNull<T>) -> Self
Constructs a box from a NonNull pointer.
associated_function alloc Stable since 1.100.0 Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe fn from_raw(raw: *mut T) -> Self
Constructs a box from a raw pointer.
associated_function alloc Stable since 1.4.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn into_non_null(b: Self) -> NonNull<T>
Consumes the Box, returning a wrapped NonNull pointer.
associated_function alloc Stable since 1.100.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn into_pin(boxed: Self) -> Pin<Self>
Converts a Box<T> into a Pin<Box<T>>. If T does not implement Unpin, then *boxed will be pinned in memory and unable to be moved.
associated_function alloc Stable since 1.63.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn into_raw(b: Self) -> *mut T
Consumes the Box, returning a wrapped raw pointer.
associated_function alloc Stable since 1.4.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn leak<'a>(b: Self) -> &'a mut T
Consumes and leaks the Box, returning a mutable reference, &'a mut T.
associated_function alloc Stable since 1.26.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn new(x: T) -> Self
Allocates memory on the heap and then places x into it.
associated_function alloc Stable since 1.0.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
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 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_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 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 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 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 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 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 mod collections
Collection types.
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 binary_heap
A priority queue implemented with a binary heap.
module alloc Stable since 1.0.0 Version 1.100.0-nightly
"Beginning Rust: Uh why does the compiler stop me from doing things this is horrible Advanced Rust: Ugh why doesn't the compiler stop me from doing th..."

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.