doc.rust-lang.org
pub struct Ipv4Addr
An IPv4 address.
struct
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn to_canonical(&self) -> IpAddr
Converts this address to an IpAddr::V4 if it is an IPv4-mapped IPv6 address, otherwise returns self as-is.
method
core
Stable since 1.75.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_unspecified(&self) -> bool
Returns true for the special 'unspecified' address.
method
core
Stable since 1.12.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.
method
core
Stable since 1.12.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.
method
core
Stable since 1.12.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ipv6(&self) -> bool
Returns true if this address 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 this address is an IPv4 address, and false otherwise.
method
core
Stable since 1.16.0
Version 1.100.0-nightly
doc.rust-lang.org
pub enum IpAddr
An IP address, either IPv4 or IPv6.
enum
core
Stable since 1.7.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod net
Networking primitives for IP communication.
module
core
Stable since 1.77.0
Version 1.100.0-nightly
doc.rust-lang.org
pub macro module_path!
Expands to a string that represents the current module path.
macro
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn zeroed<T>() -> T
Returns the value of type T represented by the all-zero byte-pattern.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe fn uninitialized<T>() -> T
Bypasses Rust's normal memory-initialization checks by pretending to produce a value of type T, while doing nothing at all.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn transmute_copy<Src, Dst>(src: &Src) -> Dst
Interprets src as having type &Dst, and then reads src without moving the contained value.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn take<T>(dest: &mut T) -> T
Replaces dest with the default value of T, returning the previous dest value.
function
core
Stable since 1.40.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn swap<T>(x: &mut T, y: &mut T)
Swaps the values at two mutable locations, without deinitializing either one.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn size_of_val_raw<T>(val: *const T) -> usize
Returns the size of the pointed-to value in bytes.
function
core
Stable since 1.100.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn size_of_val<T>(val: &T) -> usize
Returns the size of the pointed-to value in bytes.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn size_of<T>() -> usize
Returns the size of a type in bytes.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn replace<T>(dest: &mut T, src: T) -> T
Moves src into the referenced dest, returning the previous dest value.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub macro offset_of!
Expands to the offset in bytes of a field from the beginning of the given type.
macro
core
Stable since 1.77.0
Version 1.100.0-nightly