Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub struct AccessError
An error returned by LocalKey::try_with.
struct std Stable since 1.26.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn thread(&self) -> &Thread
Extracts a handle to the underlying thread.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn join(self) -> Result<T>
Waits for the associated thread to finish.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn is_finished(&self) -> bool
Checks if the associated thread has finished running its main function.
method std Stable since 1.61.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct JoinHandle<T>
An owned permission to join on a thread (block on its termination).
struct std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct ThreadId
A unique identifier for a running thread.
struct std Stable since 1.19.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn yield_now()
Cooperatively gives up a timeslice to the OS scheduler.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn spawn<F, T>(f: F) -> super::join_handle::JoinHandle<T>
Spawns a new thread, returning a JoinHandle for it.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn sleep_ms(ms: u32)
Uses sleep.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn sleep(dur: crate::time::Duration)
Puts the current thread to sleep for at least the specified amount of time.
function std Stable since 1.4.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn park_timeout_ms(ms: u32)
Uses park_timeout.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn park_timeout(dur: crate::time::Duration)
Blocks unless or until the current thread's token is made available or the specified duration has been reached (may wake spuriously).
function std Stable since 1.4.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn park()
Blocks unless or until the current thread's token is made available.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn panicking() -> bool
Determines whether the current thread is panicking.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn available_parallelism() -> io::Result<crate::num::NonZero<usize>>
Returns an estimate of the default amount of parallelism a program should use.
function std Stable since 1.59.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn current() -> super::thread::Thread
Gets a handle to the thread that invokes it.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn stack_size(self, size: usize) -> Builder
Sets the size of the stack (in bytes) for the new thread.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe fn spawn_unchecked<F, T>(self, f: F) -> io::Result<JoinHandle<T>>
Spawns a new thread without any lifetime restrictions by taking ownership of the Builder, and returns an io::Result to its JoinHandle.
method std Stable since 1.82.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn spawn_scoped<'scope, 'env, F, T>(self, scope: &'scope Scope<'scope, 'env>, f: F) -> io::Result<ScopedJoinHandle<'scope, T>>
Spawns a new scoped thread using the settings set through this Builder.
method std Stable since 1.63.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn spawn<F, T>(self, f: F) -> io::Result<JoinHandle<T>>
Spawns a new thread by taking ownership of the Builder, and returns an io::Result to its JoinHandle.
method std Stable since 1.0.0 Version 1.100.0-nightly
"My experience with C++ is that, as I’ve become more of an expert in the language, I’ve become more disillusioned with it. It’s incredibly hard t..."

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.