pub struct AddressInfo {
pub address: SocketAddress,
pub socket_type: SocketType,
pub protocol: Option<SocketProtocol>,
}Expand description
An owned IP endpoint and its socket creation parameters. Obtain its domain with SocketDomain::from(info.address); pass its type and protocol directly to socket_open.
Fields§
§address: SocketAddressThe resolved IP endpoint, including any IPv6 flow information and scope identifier.
socket_type: SocketTypeThe socket type to pass to socket_open.
protocol: Option<SocketProtocol>None represents the resolver’s zero/default protocol.
Trait Implementations§
Source§impl AddressInfoView for AddressInfo
impl AddressInfoView for AddressInfo
Source§fn address(&self) -> SocketAddress
fn address(&self) -> SocketAddress
Decode the IP endpoint on demand, preserving IPv6 flow information and scope identifiers.
Source§fn socket_type(&self) -> SocketType
fn socket_type(&self) -> SocketType
The socket type for creating a socket to this endpoint.
Source§fn protocol(&self) -> Option<SocketProtocol>
fn protocol(&self) -> Option<SocketProtocol>
None represents the resolver’s zero/default protocol.Source§fn to_address_info(&self) -> AddressInfo
fn to_address_info(&self) -> AddressInfo
Explicitly materialize a small, owned portable record. This conversion requires no heap allocation.
Source§impl Clone for AddressInfo
impl Clone for AddressInfo
impl Copy for AddressInfo
Source§impl Debug for AddressInfo
impl Debug for AddressInfo
impl Eq for AddressInfo
Source§impl PartialEq for AddressInfo
impl PartialEq for AddressInfo
impl StructuralPartialEq for AddressInfo
Auto Trait Implementations§
impl Freeze for AddressInfo
impl RefUnwindSafe for AddressInfo
impl Send for AddressInfo
impl Sync for AddressInfo
impl Unpin for AddressInfo
impl UnsafeUnpin for AddressInfo
impl UnwindSafe for AddressInfo
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