Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub fn elapsed(&self) -> Duration
Returns the amount of time elapsed since this instant.
method std Stable since 1.8.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn duration_since(&self, earlier: Instant) -> Duration
Returns the amount of time elapsed from another instant to this one, or zero duration if that instant is later than this one.
method std Stable since 1.8.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn checked_sub(&self, duration: Duration) -> Option<Instant>
Returns Some(t) where t is the time self - duration if t can be represented as Instant (which means it's inside the bounds of the underlying data structure), None otherwise.
method std Stable since 1.34.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn checked_duration_since(&self, earlier: Instant) -> Option<Duration>
Returns the amount of time elapsed from another instant to this one, or None if that instant is later than this one.
method std Stable since 1.39.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn checked_add(&self, duration: Duration) -> Option<Instant>
Returns Some(t) where t is the time self + duration if t can be represented as Instant (which means it's inside the bounds of the underlying data structure), None otherwise.
method std Stable since 1.34.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct Instant
A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.
struct std Stable since 1.8.0 Version 1.100.0-nightly
doc.rust-lang.org
pub mod time
Temporal quantification.
module std Stable since 1.3.0 Version 1.100.0-nightly
doc.rust-lang.org
pub macro thread_local!
Declare a new thread local storage key of type std::thread::LocalKey.
macro std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn unpark(&self)
Atomically makes the handle's token available if it is not already.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn name(&self) -> Option<&str>
Gets the thread's name.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn id(&self) -> ThreadId
Gets the thread's unique identifier.
method std Stable since 1.19.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct Thread
A handle to a thread.
struct std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn scope<'env, F, T>(f: F) -> T
Creates a scope for spawning scoped threads.
function std Stable since 1.63.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.63.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.63.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.63.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct ScopedJoinHandle<'scope, T>
An owned permission to join on a scoped thread (block on its termination).
struct std Stable since 1.63.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn spawn<F, T>(&'scope self, f: F) -> ScopedJoinHandle<'scope, T>
Spawns a new thread within a scope, returning a ScopedJoinHandle for it.
method std Stable since 1.63.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct Scope<'scope, 'env>
A scope to spawn scoped threads in.
struct std Stable since 1.63.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct LocalKey<T>
A thread local storage (TLS) key which owns its contents.
struct std Stable since 1.0.0 Version 1.100.0-nightly
"There actually are NOT very many places where the C code’s behavior conflicts with Rust’s borrowing rules. This is both somewhat surprising, becau..."

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.