Struct url::HostAndPort
source · Expand description
This mostly exists because coherence rules don’t allow us to implement
ToSocketAddrs for (Host<S>, u16)
.
Fields§
§host: Host<S>
§port: u16
Implementations§
source§impl<'a> HostAndPort<&'a str>
impl<'a> HostAndPort<&'a str>
sourcepub fn to_owned(&self) -> HostAndPort<String>
pub fn to_owned(&self) -> HostAndPort<String>
Return a copy of self
that owns an allocated String
but does not borrow an &Url
.
Trait Implementations§
source§impl<S: Clone> Clone for HostAndPort<S>
impl<S: Clone> Clone for HostAndPort<S>
source§fn clone(&self) -> HostAndPort<S>
fn clone(&self) -> HostAndPort<S>
Returns a copy 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<S: Debug> Debug for HostAndPort<S>
impl<S: Debug> Debug for HostAndPort<S>
source§impl<S: AsRef<str>> ToSocketAddrs for HostAndPort<S>
impl<S: AsRef<str>> ToSocketAddrs for HostAndPort<S>
§type Iter = SocketAddrs
type Iter = SocketAddrs
Returned iterator over socket addresses which this type may correspond
to. Read more
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 more