Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub const fn set_ip(&mut self, new_ip: Ipv6Addr)
Changes the IP address associated with this socket address.
method core Stable since 1.9.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn set_flowinfo(&mut self, new_flowinfo: u32)
Changes the flow information associated with this socket address.
method core Stable since 1.9.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn scope_id(&self) -> u32
Returns the scope ID associated with this address.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn port(&self) -> u16
Returns the port number associated with this socket address.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn new(ip: Ipv6Addr, port: u16, flowinfo: u32, scope_id: u32) -> SocketAddrV6
Creates a new socket address from an IPv6 address, a 16-bit port number, and the flowinfo and scope_id fields.
associated_function core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn ip(&self) -> &Ipv6Addr
Returns the IP address associated with this socket address.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn flowinfo(&self) -> u32
Returns the flow information associated with this address.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct SocketAddrV6
An IPv6 socket address.
struct core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn set_port(&mut self, new_port: u16)
Changes the port number associated with this socket address.
method core Stable since 1.9.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn set_ip(&mut self, new_ip: Ipv4Addr)
Changes the IP address associated with this socket address.
method core Stable since 1.9.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn port(&self) -> u16
Returns the port number associated with this socket address.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn new(ip: Ipv4Addr, port: u16) -> SocketAddrV4
Creates a new socket address from an IPv4 address and a port number.
associated_function core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn ip(&self) -> &Ipv4Addr
Returns the IP address associated with this socket address.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct SocketAddrV4
An IPv4 socket address.
struct core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn set_port(&mut self, new_port: u16)
Changes the port number associated with this socket address.
method core Stable since 1.9.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn set_ip(&mut self, new_ip: IpAddr)
Changes the IP address associated with this socket address.
method core Stable since 1.9.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn port(&self) -> u16
Returns the port number associated with this socket address.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn new(ip: IpAddr, port: u16) -> SocketAddr
Creates a new socket address from an IP address and a port number.
associated_function core Stable since 1.7.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ipv6(&self) -> bool
Returns true if the IP address in this SocketAddr is an IPv6 address, and false otherwise.
method core Stable since 1.16.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ipv4(&self) -> bool
Returns true if the IP address in this SocketAddr is an IPv4 address, and false otherwise.
method core Stable since 1.16.0 Version 1.100.0-nightly
"The learning curve for Rust is relatively steep compared to other languages, but once you climb it you'll never look down."

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.