pub enum Address {
Tcp {
peer_id: Option<Id>,
host: String,
port: u16,
},
Unix {
path: String,
},
}
Expand description
Remote address (TCP or UNIX socket)
For TCP-based addresses, this supports both IPv4 and IPv6 addresses and hostnames.
If the scheme is not supplied (i.e. tcp://
or unix://
) when parsing
from a string, it is assumed to be a TCP address.
Variants§
Implementations§
Source§impl Address
impl Address
Sourcepub fn from_listen_address(address: &ListenAddress) -> Option<Self>
pub fn from_listen_address(address: &ListenAddress) -> Option<Self>
Convert ListenAddress
to a net::Address
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Address
impl<'de> Deserialize<'de> for Address
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.