Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub struct OnceLock<T>
A synchronization primitive which can nominally be written to only once.
struct std Stable since 1.70.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn is_poisoned(&self) -> bool
Returns true if the associated Once was poisoned prior to the invocation of the closure passed to Once::call_once_force().
method std Stable since 1.51.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct OnceState
State yielded to Once::call_once_force()’s closure parameter. The state can be used to query the poison status of the Once.
struct std Stable since 1.51.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn wait_force(&self)
Blocks the current thread until initialization has completed, ignoring poisoning.
method std Stable since 1.86.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn wait(&self)
Blocks the current thread until initialization has completed.
method std Stable since 1.86.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn new() -> Once
Creates a new Once value.
associated_function std Stable since 1.2.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn is_completed(&self) -> bool
Returns true if some call_once() call has completed successfully. Specifically, is_completed will return false in the following situations:
method std Stable since 1.43.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn call_once_force<F>(&self, f: F)
Performs the same function as call_once() except ignores poisoning.
method std Stable since 1.51.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn call_once<F>(&self, f: F)
Performs an initialization routine once and only once. The given closure will be executed if this is the first time call_once has been called, and otherwise the routine will not be invoked.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct Once
A low-level synchronization primitive for one-time global execution.
struct std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const ONCE_INIT: Once
Initialization value for static Once values.
constant std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn sync_channel<T>(bound: usize) -> (SyncSender<T>, Receiver<T>)
Creates a new synchronous, bounded channel.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn channel<T>() -> (Sender<T>, Receiver<T>)
Creates a new asynchronous channel, returning the sender/receiver halves.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub enum TrySendError<T>
This enumeration is the list of the possible error outcomes for the try_send method.
enum std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub enum TryRecvError
This enumeration is the list of the possible reasons that try_recv could not return data when called. This can occur with both a channel and a sync_channel.
enum std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct TryIter<'a, T>
An iterator that attempts to yield all pending values for a Receiver, created by try_iter.
struct std Stable since 1.15.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn try_send(&self, t: T) -> Result<(), TrySendError<T>>
Attempts to send a value on this channel without blocking.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn send(&self, t: T) -> Result<(), SendError<T>>
Sends a value on this synchronous channel.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct SyncSender<T>
The sending-half of Rust's synchronous sync_channel type.
struct std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn send(&self, t: T) -> Result<(), SendError<T>>
Attempts to send a value on this channel, returning it back if it could not be sent.
method std Stable since 1.0.0 Version 1.100.0-nightly
"It's amazing how far const eval has come in #Rust. It wasn't too long ago that even a simple if/else wasn't permitted. Now we're not that far off from..."

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.