#[repr(C, align(8))]pub struct SockAddrIpv6 { /* private fields */ }
Expand description
Socket address type for the IPv6 protocol family.
Implementations§
Source§impl SockAddrIpv6
impl SockAddrIpv6
Sourcepub const fn new(host_addr: Ipv6Addr, port: u16) -> Self
pub const fn new(host_addr: Ipv6Addr, port: u16) -> Self
Create a new SockAddrIpv6
with the specified IP address and port
number.
Port number should be provided in the host’s native byte order. This function will convert it to network byte order where necessary.
Sourcepub const fn new_with_scope(
host_addr: Ipv6Addr,
port: u16,
scope_id: u32,
) -> Self
pub const fn new_with_scope( host_addr: Ipv6Addr, port: u16, scope_id: u32, ) -> Self
Create a new SockAddrIpv6
with the specified IP address, port
number, and scope id.
Port number should be provided in the host’s native byte order. This function will convert it to network byte order where necessary.
Sourcepub const fn host_address(&self) -> Ipv6Addr
pub const fn host_address(&self) -> Ipv6Addr
Returns the host address part of the socket address.
Trait Implementations§
Source§impl Clone for SockAddrIpv6
impl Clone for SockAddrIpv6
Source§fn clone(&self) -> SockAddrIpv6
fn clone(&self) -> SockAddrIpv6
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SockAddrIpv6
impl Debug for SockAddrIpv6
Source§impl SockAddr for SockAddrIpv6
impl SockAddr for SockAddrIpv6
impl Copy for SockAddrIpv6
Auto Trait Implementations§
impl Freeze for SockAddrIpv6
impl RefUnwindSafe for SockAddrIpv6
impl Send for SockAddrIpv6
impl Sync for SockAddrIpv6
impl Unpin for SockAddrIpv6
impl UnwindSafe for SockAddrIpv6
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