#[repr(C)]pub struct NetworkAddress {
pub family: u32,
pub bytes: [u8; 16],
pub port: u16,
pub reserved: u16,
pub scope_id: u32,
}Expand description
Fixed-width address. Bytes are in network order; integer fields are host order. IPv4 uses the first four bytes and requires the remaining bytes to be zero. Scope must be zero: Core does not support scoped IPv6 endpoints.
Fields§
§family: u32§bytes: [u8; 16]§port: u16§reserved: u16§scope_id: u32Trait Implementations§
Source§impl Clone for NetworkAddress
impl Clone for NetworkAddress
Source§fn clone(&self) -> NetworkAddress
fn clone(&self) -> NetworkAddress
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 NetworkAddress
impl Debug for NetworkAddress
Source§impl PartialEq for NetworkAddress
impl PartialEq for NetworkAddress
Source§fn eq(&self, other: &NetworkAddress) -> bool
fn eq(&self, other: &NetworkAddress) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for NetworkAddress
impl Eq for NetworkAddress
impl StructuralPartialEq for NetworkAddress
Auto Trait Implementations§
impl Freeze for NetworkAddress
impl RefUnwindSafe for NetworkAddress
impl Send for NetworkAddress
impl Sync for NetworkAddress
impl Unpin for NetworkAddress
impl UnsafeUnpin for NetworkAddress
impl UnwindSafe for NetworkAddress
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