#[repr(C)]pub struct Inet6SocketAddress { /* private fields */ }
Expand description
IPv6 socket address.
This includes an IPv6 address and a 16-bit port number.
Implementations§
Source§impl Inet6SocketAddress
impl Inet6SocketAddress
Sourcepub fn new(ip: Ipv6Addr, port: u16, flowinfo: u32, scope_id: u32) -> Self
pub fn new(ip: Ipv6Addr, port: u16, flowinfo: u32, scope_id: u32) -> Self
Create an IPv6 socket address.
Sourcepub fn from_raw(inner: sockaddr_in6) -> Self
pub fn from_raw(inner: sockaddr_in6) -> Self
Create an IPv6 socket address from a libc::sockaddr_in6
.
Sourcepub fn into_raw(self) -> sockaddr_in6
pub fn into_raw(self) -> sockaddr_in6
Convert the [SocketAddress
] into raw libc
parts.
Sourcepub fn set_flowinfo(&mut self, flowinfo: u32)
pub fn set_flowinfo(&mut self, flowinfo: u32)
Set the flow information associated with the socket address.
Sourcepub fn set_scope_id(&mut self, scope_id: u32)
pub fn set_scope_id(&mut self, scope_id: u32)
Set the scope ID associated with the socket address.
Trait Implementations§
Source§impl AsSocketAddress for Inet6SocketAddress
impl AsSocketAddress for Inet6SocketAddress
Source§fn as_sockaddr_mut(address: &mut MaybeUninit<Self>) -> *mut sockaddr
fn as_sockaddr_mut(address: &mut MaybeUninit<Self>) -> *mut sockaddr
Get a mutable pointer to the socket address. Read more
Source§fn finalize(address: MaybeUninit<Self>, len: socklen_t) -> Result<Self>
fn finalize(address: MaybeUninit<Self>, len: socklen_t) -> Result<Self>
Finalize a socket address that has been written into by the kernel. Read more
Source§fn family(&self) -> sa_family_t
fn family(&self) -> sa_family_t
Get the address family of the socket address.
Source§impl Clone for Inet6SocketAddress
impl Clone for Inet6SocketAddress
Source§fn clone(&self) -> Inet6SocketAddress
fn clone(&self) -> Inet6SocketAddress
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 From<&Inet6SocketAddress> for SocketAddrV6
impl From<&Inet6SocketAddress> for SocketAddrV6
Source§fn from(other: &Inet6SocketAddress) -> Self
fn from(other: &Inet6SocketAddress) -> Self
Converts to this type from the input type.
Source§impl From<&Inet6SocketAddress> for SocketAddress
impl From<&Inet6SocketAddress> for SocketAddress
Source§fn from(other: &Inet6SocketAddress) -> Self
fn from(other: &Inet6SocketAddress) -> Self
Converts to this type from the input type.
Source§impl From<&SocketAddrV6> for Inet6SocketAddress
impl From<&SocketAddrV6> for Inet6SocketAddress
Source§fn from(other: &SocketAddrV6) -> Self
fn from(other: &SocketAddrV6) -> Self
Converts to this type from the input type.
Source§impl From<Inet6SocketAddress> for SocketAddrV6
impl From<Inet6SocketAddress> for SocketAddrV6
Source§fn from(other: Inet6SocketAddress) -> Self
fn from(other: Inet6SocketAddress) -> Self
Converts to this type from the input type.
Source§impl From<Inet6SocketAddress> for SocketAddress
impl From<Inet6SocketAddress> for SocketAddress
Source§fn from(other: Inet6SocketAddress) -> Self
fn from(other: Inet6SocketAddress) -> Self
Converts to this type from the input type.
Source§impl From<SocketAddrV6> for Inet6SocketAddress
impl From<SocketAddrV6> for Inet6SocketAddress
Source§fn from(other: SocketAddrV6) -> Self
fn from(other: SocketAddrV6) -> Self
Converts to this type from the input type.
Source§impl SpecificSocketAddress for Inet6SocketAddress
impl SpecificSocketAddress for Inet6SocketAddress
Source§fn static_family() -> sa_family_t
fn static_family() -> sa_family_t
The address family supported by this socket address.
Auto Trait Implementations§
impl Freeze for Inet6SocketAddress
impl RefUnwindSafe for Inet6SocketAddress
impl Send for Inet6SocketAddress
impl Sync for Inet6SocketAddress
impl Unpin for Inet6SocketAddress
impl UnwindSafe for Inet6SocketAddress
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