pub struct HickoryToSocketAddrs<T: IntoName + Clone> { /* private fields */ }
Expand description
Wrapper around host and port to resolve to SocketAddr
through hickory-dns
use hickory_to_socket_addrs::HickoryToSocketAddrs;
use std::net::ToSocketAddrs;
let socket_addrs = "www.rust-lang.org:443"
.parse::<HickoryToSocketAddrs<_>>()?
.to_socket_addrs()?
.collect::<Vec<_>>();
Implementations§
Source§impl<H: IntoName + Clone> HickoryToSocketAddrs<H>
impl<H: IntoName + Clone> HickoryToSocketAddrs<H>
Trait Implementations§
Source§impl FromStr for HickoryToSocketAddrs<String>
impl FromStr for HickoryToSocketAddrs<String>
Source§impl<T: IntoName + Clone> ToSocketAddrs for HickoryToSocketAddrs<T>
impl<T: IntoName + Clone> ToSocketAddrs for HickoryToSocketAddrs<T>
Source§type Iter = HickorySocketAddrs
type Iter = HickorySocketAddrs
Returned iterator over socket addresses which this type may correspond
to.
Source§fn to_socket_addrs(&self) -> Result<Self::Iter>
fn to_socket_addrs(&self) -> Result<Self::Iter>
Converts this object to an iterator of resolved
SocketAddr
s. Read moreAuto Trait Implementations§
impl<T> Freeze for HickoryToSocketAddrs<T>where
T: Freeze,
impl<T> RefUnwindSafe for HickoryToSocketAddrs<T>where
T: RefUnwindSafe,
impl<T> Send for HickoryToSocketAddrs<T>where
T: Send,
impl<T> Sync for HickoryToSocketAddrs<T>where
T: Sync,
impl<T> Unpin for HickoryToSocketAddrs<T>where
T: Unpin,
impl<T> UnwindSafe for HickoryToSocketAddrs<T>where
T: UnwindSafe,
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