pub fn target_addr_info_to_socketaddr(tai: TargetAddrInfo) -> SocketAddr {
    let mut sa = SocketAddr::from(TargetAddr::from(&tai));
    // TODO(raggi): the port special case needed here indicates a general problem in our
    // addressing strategy that is worth reviewing.
    if let TargetAddrInfo::IpPort(ref ipp) = tai {
        sa.set_port(ipp.port)
    }
    sa
}
/// Convert a TargetAddrInfo to a SocketAddr preserving the port number if
/// provided, otherwise the returned SocketAddr will have port number 0.
Convert a TargetAddrInfo to a SocketAddr preserving the port number if
provided, otherwise the returned SocketAddr will have port number 0.
Convert a TargetAddrInfo to a SocketAddr preserving the port number if provided otherwise the returned SocketAddr will have port number 0 .
pub fn target_addr_info_to_socketaddr(tai: TargetAddrInfo) -> SocketAddr {
    let mut sa = SocketAddr::from(TargetAddr::from(&tai));
    // TODO(raggi): the port special case needed here indicates a general problem in our
    // addressing strategy that is worth reviewing.
    if let TargetAddrInfo::IpPort(ref ipp) = tai {
        sa.set_port(ipp.port)
    }
    sa
}
pub fn target_addr_info_to_socketaddr ( tai : TargetAddrInfo ) -> SocketAddr { let mut sa = SocketAddr :: from ( TargetAddr :: from ( & tai ) ) ; // TODO(raggi): the port special case needed here indicates a general problem in our // addressing strategy that is worth reviewing. if let TargetAddrInfo :: IpPort ( ref ipp ) = tai { sa . set_port ( ipp . port ) } sa }
Convert a TargetAddrInfo to a SocketAddr preserving the port number if
provided, otherwise the returned SocketAddr will have port number 0.
Convert a TargetAddrInfo to a SocketAddr preserving the port number if provided otherwise the returned SocketAddr will have port number 0 .
tai
TargetAddrInfo
tai
TargetAddrInfo