Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub const fn transpose(self) -> Option<Result<T, E>>
Transposes a Result of an Option into an Option of a Result.
method core Stable since 1.33.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn or_else<F, O>(self, op: O) -> Result<T, F>
Calls op if the result is Err, otherwise returns the Ok value of self.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn or<F>(self, res: Result<T, F>) -> Result<T, F>
Returns res if the result is Err, otherwise returns the Ok value of self.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn ok(self) -> Option<T>
Converts from Result<T, E> to Option<T>.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn map_or_else<U, D, F>(self, default: D, f: F) -> U
Maps a Result<T, E> to U by applying fallback function default to a contained Err value, or function f to a contained Ok value.
method core Stable since 1.41.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn map_or_default<U, F>(self, f: F) -> U
Maps a Result<T, E> to a U by applying function f to the contained value if the result is Ok, otherwise if Err, returns the default value for the type U.
method core Stable since 1.98.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn map_or<U, F>(self, default: U, f: F) -> U
Returns the provided default (if Err), or applies a function to the contained value (if Ok).
method core Stable since 1.41.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn map_err<F, O>(self, op: O) -> Result<T, F>
Maps a Result<T, E> to Result<T, F> by applying a function to a contained Err value, leaving an Ok value untouched.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn map<U, F>(self, op: F) -> Result<U, E>
Maps a Result<T, E> to Result<U, E> by applying a function to a contained Ok value, leaving an Err value untouched.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn iter_mut(&mut self) -> IterMut<'_, T>
Returns a mutable iterator over the possibly contained value.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn iter(&self) -> Iter<'_, T>
Returns an iterator over the possibly contained value.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ok_and<F>(self, f: F) -> bool
Returns true if the result is Ok and the value inside of it matches a predicate.
method core Stable since 1.70.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ok(&self) -> bool
Returns true if the result is Ok.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_err_and<F>(self, f: F) -> bool
Returns true if the result is Err and the value inside of it matches a predicate.
method core Stable since 1.70.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_err(&self) -> bool
Returns true if the result is Err.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn inspect_err<F>(self, f: F) -> Self
Calls a function with a reference to the contained value if Err.
method core Stable since 1.76.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn inspect<F>(self, f: F) -> Self
Calls a function with a reference to the contained value if Ok.
method core Stable since 1.76.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn flatten(self) -> Result<T, E>
Converts from Result<Result<T, E>, E> to Result<T, E>
method core Stable since 1.89.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn expect_err(self, msg: &str) -> E
Returns the contained Err value, consuming the self value.
method core Stable since 1.17.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn expect(self, msg: &str) -> T
Returns the contained Ok value, consuming the self value.
method core Stable since 1.4.0 Version 1.100.0-nightly
"Learning Rust has taught me something - "There are really no problems, just adventure and opportunities""

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.