Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub const fn is_zero(&self) -> bool
Returns true if this Duration spans no time.
method core Stable since 1.53.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn from_secs_f64(secs: f64) -> Duration
Creates a new Duration from the specified number of seconds represented as f64.
associated_function core Stable since 1.38.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn from_secs_f32(secs: f32) -> Duration
Creates a new Duration from the specified number of seconds represented as f32.
associated_function core Stable since 1.38.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_secs(secs: u64) -> Duration
Creates a new Duration from the specified number of whole seconds.
associated_function core Stable since 1.3.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_nanos_u128(nanos: u128) -> Duration
Creates a new Duration from the specified number of nanoseconds.
associated_function core Stable since 1.93.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_nanos(nanos: u64) -> Duration
Creates a new Duration from the specified number of nanoseconds.
associated_function core Stable since 1.27.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_mins(mins: u64) -> Duration
Creates a new Duration from the specified number of minutes.
associated_function core Stable since 1.91.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_millis(millis: u64) -> Duration
Creates a new Duration from the specified number of milliseconds.
associated_function core Stable since 1.3.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_micros(micros: u64) -> Duration
Creates a new Duration from the specified number of microseconds.
associated_function core Stable since 1.27.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_hours(hours: u64) -> Duration
Creates a new Duration from the specified number of hours.
associated_function core Stable since 1.91.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn div_f64(self, rhs: f64) -> Duration
Divides Duration by f64.
method core Stable since 1.38.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn div_f32(self, rhs: f32) -> Duration
Divides Duration by f32.
method core Stable since 1.38.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn div_duration_f64(self, rhs: Duration) -> f64
Divides Duration by Duration and returns f64.
method core Stable since 1.80.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn div_duration_f32(self, rhs: Duration) -> f32
Divides Duration by Duration and returns f32.
method core Stable since 1.80.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_sub(self, rhs: Duration) -> Option<Duration>
Checked Duration subtraction. Computes self - other, returning None if the result would be negative or if overflow occurred.
method core Stable since 1.16.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_mul(self, rhs: u32) -> Option<Duration>
Checked Duration multiplication. Computes self * other, returning None if overflow occurred.
method core Stable since 1.16.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_div(self, rhs: u32) -> Option<Duration>
Checked Duration division. Computes self / other, returning None if other == 0.
method core Stable since 1.16.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_add(self, rhs: Duration) -> Option<Duration>
Checked Duration addition. Computes self + other, returning None if overflow occurred.
method core Stable since 1.16.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn as_secs_f64(&self) -> f64
Returns the number of seconds contained by this Duration as f64.
method core Stable since 1.38.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn as_secs_f32(&self) -> f32
Returns the number of seconds contained by this Duration as f32.
method core Stable since 1.38.0 Version 1.100.0-nightly
"The design of the safe/unsafe split means that there is an asymmetric trust relationship between Safe and Unsafe Rust. Safe Rust inherently has to tru..."

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.