Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub fn location(&self) -> Option<&'static Location<'static>>
Returns information about the location from which the panic originated, if available.
method core Stable since 1.10.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct PanicInfo<'a>
A struct providing information about a panic.
struct core Stable since 1.10.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn line(&self) -> u32
Returns the line number from which the panic originated.
method core Stable since 1.10.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn file_as_c_str(&self) -> &'a CStr
Returns the name of the source file as a nul-terminated CStr.
method core Stable since 1.92.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn file(&self) -> &'a str
Returns the name of the source file from which the panic originated.
method core Stable since 1.10.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn column(&self) -> u32
Returns the column from which the panic originated.
method core Stable since 1.25.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn caller() -> &'static Location<'static>
Returns the source location of the caller of this function. If that function's caller is annotated then its call location will be returned, and so on up the stack to the first call within a non-tracked function body.
associated_function core Stable since 1.46.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct Location<'a>
A struct containing information about the location of a panic.
struct core Stable since 1.10.0 Version 1.100.0-nightly
doc.rust-lang.org
pub mod panic
Panic support in core.
module core Stable since 1.41.0 Version 1.100.0-nightly
doc.rust-lang.org
pub macro panic!
Panics the current thread.
macro core Stable since 1.6.0 Version 1.100.0-nightly
doc.rust-lang.org
pub macro option_env!
Optionally inspects an environment variable at compile time.
macro core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn zip<U>(self, other: Option<U>) -> Option<(T, U)>
Makes a tuple of the value in self and the value in another Option.
method core Stable since 1.46.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn xor(self, optb: Option<T>) -> Option<T>
Returns Some if exactly one of self, optb is Some, otherwise returns None.
method core Stable since 1.37.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn unzip(self) -> (Option<T>, Option<U>)
Unzips an option containing a tuple of two options.
method core Stable since 1.66.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn unwrap_unchecked(self) -> T
Returns the contained Some value, consuming the self value, without checking that the value is not None.
method core Stable since 1.58.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn unwrap_or_else<F>(self, f: F) -> T
Returns the contained Some value or computes it from a closure.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn unwrap_or_default(self) -> T
Returns the contained Some value or a default.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn unwrap_or(self, default: T) -> T
Returns the contained Some value or a provided default.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn unwrap(self) -> T
Returns the contained Some value, consuming the self value.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn transpose(self) -> Result<Option<T>, E>
Transposes an Option of a Result into a Result of an Option.
method core Stable since 1.33.0 Version 1.100.0-nightly
"Code doesn't deal with resources until it does. Similarly with everything else that forces you to reason about control flow - you don't care about thr..."

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.