Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
const BITS: u32
The size of an IPv6 address in bits.
associated_constant core Stable since 1.80.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct Ipv6Addr
An IPv6 address.
struct core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn to_ipv6_mapped(&self) -> Ipv6Addr
Converts this address to an IPv4-mapped IPv6 address.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn to_ipv6_compatible(&self) -> Ipv6Addr
Converts this address to an IPv4-compatible IPv6 address.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn to_bits(self) -> u32
Converts an IPv4 address into a u32 representation using native byte order.
method core Stable since 1.80.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn octets(&self) -> [u8; 4]
Returns the four eight-bit integers that make up this address.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn new(a: u8, b: u8, c: u8, d: u8) -> Ipv4Addr
Creates a new IPv4 address from four eight-bit octets.
associated_function core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_unspecified(&self) -> bool
Returns true for the special 'unspecified' address (0.0.0.0).
method core Stable since 1.12.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_private(&self) -> bool
Returns true if this is a private address.
method core Stable since 1.7.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_multicast(&self) -> bool
Returns true if this is a multicast address (224.0.0.0/4).
method core Stable since 1.7.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_loopback(&self) -> bool
Returns true if this is a loopback address (127.0.0.0/8).
method core Stable since 1.7.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_link_local(&self) -> bool
Returns true if the address is link-local (169.254.0.0/16).
method core Stable since 1.7.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_documentation(&self) -> bool
Returns true if this address is in a range designated for documentation.
method core Stable since 1.7.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_broadcast(&self) -> bool
Returns true if this is a broadcast address (255.255.255.255).
method core Stable since 1.7.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_octets(octets: [u8; 4]) -> Ipv4Addr
Creates an Ipv4Addr from a four element byte array.
associated_function core Stable since 1.91.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_bits(bits: u32) -> Ipv4Addr
Converts a native byte order u32 into an IPv4 address.
associated_function core Stable since 1.80.0 Version 1.100.0-nightly
doc.rust-lang.org
const UNSPECIFIED: Self
An IPv4 address representing an unspecified address: 0.0.0.0
associated_constant core Stable since 1.30.0 Version 1.100.0-nightly
doc.rust-lang.org
const LOCALHOST: Self
An IPv4 address with the address pointing to localhost: 127.0.0.1
associated_constant core Stable since 1.30.0 Version 1.100.0-nightly
doc.rust-lang.org
const BROADCAST: Self
An IPv4 address representing the broadcast address: 255.255.255.255.
associated_constant core Stable since 1.30.0 Version 1.100.0-nightly
doc.rust-lang.org
const BITS: u32
The size of an IPv4 address in bits.
associated_constant core Stable since 1.80.0 Version 1.100.0-nightly
"And it's true that a lot of stuff requires a "sufficiently smart compiler" but really it's 2020, if your compiler isn't serving you breakfast in bed y..."

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.