pub struct SocketAddress { /* private fields */ }Expand description
An IP address with an associated port.
Implementations§
Source§impl SocketAddress
Construction
impl SocketAddress
Construction
Source§impl SocketAddress
Properties
impl SocketAddress
Properties
Source§impl SocketAddress
Conversions
impl SocketAddress
Conversions
Sourcepub const fn to_v4(&self) -> Option<SocketAddressV4>
pub const fn to_v4(&self) -> Option<SocketAddressV4>
Converts the socket address to an optional IPv4 socket address.
Sourcepub const fn to_v6(&self) -> Option<SocketAddressV6>
pub const fn to_v6(&self) -> Option<SocketAddressV6>
Converts the socket address to an optional IPv6 socket address.
Converts the socket address to an authority.
Source§impl SocketAddress
Standard Library Conversions
impl SocketAddress
Standard Library Conversions
Sourcepub const fn to_std(&self, flow_info: u32, scope_id: u32) -> SocketAddr
pub const fn to_std(&self, flow_info: u32, scope_id: u32) -> SocketAddr
Converts the address to a standard library address.
Trait Implementations§
Source§impl Clone for SocketAddress
impl Clone for SocketAddress
Source§fn clone(&self) -> SocketAddress
fn clone(&self) -> SocketAddress
Returns a duplicate 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 SocketAddress
impl Debug for SocketAddress
Source§impl Display for SocketAddress
impl Display for SocketAddress
Source§impl FromStr for SocketAddress
impl FromStr for SocketAddress
Source§impl Hash for SocketAddress
impl Hash for SocketAddress
Source§impl Ord for SocketAddress
impl Ord for SocketAddress
Source§fn cmp(&self, other: &SocketAddress) -> Ordering
fn cmp(&self, other: &SocketAddress) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SocketAddress
impl PartialEq for SocketAddress
Source§impl PartialOrd for SocketAddress
impl PartialOrd for SocketAddress
impl Copy for SocketAddress
impl Eq for SocketAddress
impl StructuralPartialEq for SocketAddress
Auto Trait Implementations§
impl Freeze for SocketAddress
impl RefUnwindSafe for SocketAddress
impl Send for SocketAddress
impl Sync for SocketAddress
impl Unpin for SocketAddress
impl UnwindSafe for SocketAddress
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