Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub const fn rotate_left(self, n: u32) -> Self
Shifts the bits to the left by a specified amount, n, saturating the truncated bits to the end of the resulting integer.
method core Stable since 1.74.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn reverse_bits(self) -> Self
Reverses the bit pattern of the integer.
method core Stable since 1.74.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn pow(self, exp: u32) -> Self
Raises self to the power of exp, using exponentiation by squaring.
method core Stable since 1.74.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn leading_zeros(self) -> u32
Returns the number of leading zeros in the binary representation of self.
method core Stable since 1.74.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_power_of_two(self) -> bool
Returns true if and only if self == 2^k for some k.
method core Stable since 1.74.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_positive(self) -> bool
Returns true if self is positive and false if the number is zero or negative.
method core Stable since 1.74.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_negative(self) -> bool
Returns true if self is negative and false if the number is zero or positive.
method core Stable since 1.74.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_le(x: Self) -> Self
Converts an integer from little endian to the target's endianness.
associated_function core Stable since 1.74.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_be(x: Self) -> Self
Converts an integer from big endian to the target's endianness.
associated_function core Stable since 1.74.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn count_zeros(self) -> u32
Returns the number of zeros in the binary representation of self.
method core Stable since 1.74.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn count_ones(self) -> u32
Returns the number of ones in the binary representation of self.
method core Stable since 1.74.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn abs(self) -> Saturating<isize>
Saturating absolute value. Computes self.abs(), returning MAX if self == MIN instead of overflowing.
method core Stable since 1.74.0 Version 1.100.0-nightly
doc.rust-lang.org
const MIN: Self
Returns the smallest value that can be represented by this integer type.
associated_constant core Stable since 1.74.0 Version 1.100.0-nightly
doc.rust-lang.org
const MAX: Self
Returns the largest value that can be represented by this integer type.
associated_constant core Stable since 1.74.0 Version 1.100.0-nightly
doc.rust-lang.org
const BITS: u32
Returns the size of this integer type in bits.
associated_constant core Stable since 1.74.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct Saturating<T>
Provides intentionally-saturating arithmetic on T.
struct core Stable since 1.74.0 Version 1.100.0-nightly
doc.rust-lang.org
pub type NonZeroUsize = NonZero<usize>
A usize that is known not to equal zero.
type_alias core Stable since 1.28.0 Version 1.100.0-nightly
doc.rust-lang.org
pub type NonZeroU8 = NonZero<u8>
A u8 that is known not to equal zero.
type_alias core Stable since 1.28.0 Version 1.100.0-nightly
doc.rust-lang.org
pub type NonZeroU64 = NonZero<u64>
A u64 that is known not to equal zero.
type_alias core Stable since 1.28.0 Version 1.100.0-nightly
doc.rust-lang.org
pub type NonZeroU32 = NonZero<u32>
A u32 that is known not to equal zero.
type_alias core Stable since 1.28.0 Version 1.100.0-nightly
"In general, enough layers of Rc/RefCell will make anything work."

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.