Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub const fn isolate_highest_one(self) -> Self
Returns self with only the most significant bit set, or 0 if the input is 0.
method core Stable since 1.97.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.0.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.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn ilog2(self) -> u32
Returns the base 2 logarithm of the number, rounded down.
method core Stable since 1.67.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn ilog10(self) -> u32
Returns the base 10 logarithm of the number, rounded down.
method core Stable since 1.67.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn ilog(self, base: Self) -> u32
Returns the logarithm of the number with respect to an arbitrary base, rounded down.
method core Stable since 1.67.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn highest_one(self) -> Option<u32>
Returns the index of the highest bit set to one in self, or None if self is 0.
method core Stable since 1.97.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_str_radix(src: &str, radix: u32) -> Result<i32, ParseIntError>
Parses an integer from a string slice with digits in a given base.
associated_function core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_ne_bytes(bytes: [u8; 4]) -> Self
Creates an integer value from its memory representation as a byte array in native endianness.
associated_function core Stable since 1.32.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_le_bytes(bytes: [u8; 4]) -> Self
Creates an integer value from its representation as a byte array in little endian.
associated_function core Stable since 1.32.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.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_be_bytes(bytes: [u8; 4]) -> Self
Creates an integer value from its representation as a byte array in big endian.
associated_function core Stable since 1.32.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.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn format_into(self, buf: &mut NumBuffer<Self>) -> &str
Allows users to write an integer (in signed decimal format) into a variable buf of type NumBuffer that is passed by the caller by mutable reference.
method core Stable since 1.98.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn div_euclid(self, rhs: Self) -> Self
Calculates the quotient of Euclidean division of self by rhs.
method core Stable since 1.38.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.0.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.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_sub_unsigned(self, rhs: u32) -> Option<Self>
Checked subtraction with an unsigned integer. Computes self - rhs, returning None if overflow occurred.
method core Stable since 1.66.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_sub(self, rhs: Self) -> Option<Self>
Checked integer subtraction. Computes self - rhs, returning None if overflow occurred.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn checked_shr(self, rhs: u32) -> Option<Self>
Checked shift right. Computes self >> rhs, returning None if rhs is larger than or equal to the number of bits in self.
method core Stable since 1.7.0 Version 1.100.0-nightly
"`Rc<RefCell>` is like duct tape. It's very versatile, and can fix a multitude of problems in a pinch. For some problems, it's even the best thing to ..."

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.