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§
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