pub trait HasAddrs {
// Required method
fn addrs(&self) -> &[SocketAddr];
}
Expand description
An object that represents a host on the network which may have known IP addresses.
Required Methods§
Sourcefn addrs(&self) -> &[SocketAddr]
fn addrs(&self) -> &[SocketAddr]
Return the addresses listed for this server.
NOTE that these addresses are not necessarily ones that we should connect to directly! They can be useful for telling where a server is located, or whether it is “close” to another server, but without knowing the associated protocols you cannot use these to launch a connection.
Also, for some servers, we may not actually have any relevant addresses; in that case, the returned slice is empty.
To see how to connect to a relay, use HasChanMethod::chan_method
Implementations on Foreign Types§
Implementors§
impl HasAddrs for ChannelMethod
impl HasAddrs for PtTargetAddr
impl HasAddrs for OwnedChanTarget
impl HasAddrs for OwnedCircTarget
impl<T: HasAddrs> HasAddrs for VerbatimLinkSpecCircTarget<T>
Available on crate feature
verbatim
only.