Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub fn get(this: &LazyCell<T, F>) -> Option<&T>
Returns a reference to the value if initialized. Otherwise (if uninitialized or poisoned), returns None.
associated_function core Stable since 1.94.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn get_mut(this: &mut LazyCell<T, F>) -> Option<&mut T>
Returns a mutable reference to the value if initialized. Otherwise (if uninitialized or poisoned), returns None.
associated_function core Stable since 1.94.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn new(f: F) -> LazyCell<T, F>
Creates a new lazy value with the given initializing function.
associated_function core Stable since 1.80.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct OnceCell<T>
A cell which can nominally be written to only once.
struct core Stable since 1.70.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn get(&self) -> Option<&T>
Gets the reference to the underlying value.
method core Stable since 1.70.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn get_mut(&mut self) -> Option<&mut T>
Gets the mutable reference to the underlying value.
method core Stable since 1.70.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn get_or_init<F>(&self, f: F) -> &T
Gets the contents of the cell, initializing it to f() if the cell was uninitialized.
method core Stable since 1.70.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn into_inner(self) -> Option<T>
Consumes the cell, returning the wrapped value.
method core Stable since 1.70.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn new() -> OnceCell<T>
Creates a new uninitialized cell.
associated_function core Stable since 1.70.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn set(&self, value: T) -> Result<(), T>
Initializes the contents of the cell to value.
method core Stable since 1.70.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn take(&mut self) -> Option<T>
Takes the value out of this OnceCell, moving it back to an uninitialized state.
method core Stable since 1.70.0 Version 1.100.0-nightly
doc.rust-lang.org
pub macro cfg!
Evaluates boolean combinations of configuration flags at compile-time.
macro core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub mod char
Utilities for the char primitive type.
module core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
primitive char
A character type.
primitive core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct EscapeDebug
An iterator that yields the literal escape code of a char.
struct core Stable since 1.20.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct EscapeDefault
An iterator that yields the literal escape code of a char.
struct core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct EscapeUnicode
Returns an iterator that yields the hexadecimal Unicode escape of a character, as chars.
struct core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
const MAX: char
The highest valid code point a char can have, '\u{10FFFF}'.
associated_constant core Stable since 1.52.0 Version 1.100.0-nightly
doc.rust-lang.org
core::char::MAX Deprecated
pub const MAX: char
The highest valid code point a char can have, '\u{10FFFF}'. Use char::MAX instead.
constant core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
const MAX_LEN_UTF16: usize
The maximum number of two-byte units required to encode a char to UTF-16 encoding.
associated_constant core Stable since 1.93.0 Version 1.100.0-nightly
"I've been writing Rust code everyday for years, and I used to say Rust wasn't great for writing prototypes because if forced you to ask yourself many ..."

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.