pub enum IpAddr {
V4(Ipv4Addr),
V6(Ipv6Addr),
}
๐Deprecated since 0.24.0: Use std::net::IpAddr instead
Variantsยง
V4(Ipv4Addr)
๐Deprecated since 0.24.0: Use std::net::IpAddr instead
V6(Ipv6Addr)
๐Deprecated since 0.24.0: Use std::net::IpAddr instead
Implementationsยง
Sourceยงimpl IpAddr
impl IpAddr
Sourcepub const fn new_v4(a: u8, b: u8, c: u8, d: u8) -> IpAddr
pub const fn new_v4(a: u8, b: u8, c: u8, d: u8) -> IpAddr
Create a new IpAddr that contains an IPv4 address.
The result will represent the IP address a.b.c.d
Sourcepub const fn new_v6(
a: u16,
b: u16,
c: u16,
d: u16,
e: u16,
f: u16,
g: u16,
h: u16,
) -> IpAddr
pub const fn new_v6( a: u16, b: u16, c: u16, d: u16, e: u16, f: u16, g: u16, h: u16, ) -> IpAddr
Create a new IpAddr that contains an IPv6 address.
The result will represent the IP address a:b:c:d:e:f
pub fn from_std(std: &IpAddr) -> IpAddr
pub const fn to_std(&self) -> IpAddr
Trait Implementationsยง
impl Copy for IpAddr
impl Eq for IpAddr
impl StructuralPartialEq for IpAddr
Auto Trait Implementationsยง
impl Freeze for IpAddr
impl RefUnwindSafe for IpAddr
impl Send for IpAddr
impl Sync for IpAddr
impl Unpin for IpAddr
impl UnwindSafe for IpAddr
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงunsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
๐ฌThis is a nightly-only experimental API. (
clone_to_uninit
)