Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub struct Components<'a>
An iterator over the Components of a Path.
struct std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn as_os_str(self) -> &'a OsStr
Extracts the underlying OsStr slice.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub enum Component<'a>
A single component of a path.
enum std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct Ancestors<'a>
An iterator over Path and its ancestors.
struct std Stable since 1.28.0 Version 1.100.0-nightly
doc.rust-lang.org
pub mod path
Cross-platform path manipulation.
module std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn take_hook() -> Box<dyn Fn(&crate::panic::PanicHookInfo<'_>) + Sync + Send + 'static>
Unregisters the current panic hook and returns it, registering the default hook in its place.
function std Stable since 1.10.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn set_hook(hook: Box<dyn Fn(&crate::panic::PanicHookInfo<'_>) + Sync + Send + 'static>)
Registers a custom panic hook, replacing the previously registered hook.
function std Stable since 1.10.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn resume_unwind(payload: Box<dyn Any + Send>) -> never
This is the entry point for resume_unwind. It just forwards the payload to the panic runtime.
function std Version 1.100.0-nightly
doc.rust-lang.org
pub fn panicking() -> bool
Determines whether the current thread is unwinding because of panic.
function std Version 1.100.0-nightly
doc.rust-lang.org
pub fn panic_handler(info: &core::panic::PanicInfo<'_>) -> never
Entry point of panics from the core crate (panic_impl lang item).
function std Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe fn catch_unwind<R, F>(f: F) -> Result<R, Box<dyn Any + Send>>
Invoke a closure, capturing the cause of an unwinding panic if one occurs.
function std Version 1.100.0-nightly
doc.rust-lang.org
pub fn resume_unwind(payload: Box<dyn Any + Send>) -> never
Triggers a panic without invoking the panic hook.
function std Stable since 1.9.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn panic_any<M>(msg: M) -> never
Panics the current thread with the given message as the panic payload.
function std Stable since 1.51.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn catch_unwind<F, R>(f: F) -> crate::thread::Result<R>
Invokes a closure, capturing the cause of an unwinding panic if one occurs.
function std Stable since 1.9.0 Version 1.100.0-nightly
doc.rust-lang.org
pub type PanicInfo<'a> = PanicHookInfo<'a>
A struct providing information about a panic.
type_alias std Stable since 1.10.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn payload_as_str(&self) -> Option<&str>
Returns the payload associated with the panic, if it is a string.
method std Stable since 1.91.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn payload(&self) -> &dyn Any + Send
Returns the payload associated with the panic.
method std Stable since 1.10.0 Version 1.100.0-nightly
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 std Stable since 1.10.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct PanicHookInfo<'a>
A struct providing information about a panic.
struct std Stable since 1.81.0 Version 1.100.0-nightly
doc.rust-lang.org
pub mod panic
Panic support in the standard library.
module std Stable since 1.9.0 Version 1.100.0-nightly
"what many devs often miss initially when talking about Rust is that it isn't just about the design & details of the language (which is great), Rust's ..."

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.