Enum lightning::ln::msgs::NetAddress [−][src]
pub enum NetAddress {
IPv4 {
addr: [u8; 4],
port: u16,
},
IPv6 {
addr: [u8; 16],
port: u16,
},
OnionV2 {
addr: [u8; 10],
port: u16,
},
OnionV3 {
ed25519_pubkey: [u8; 32],
checksum: u16,
version: u8,
port: u16,
},
}
Expand description
An address which can be used to connect to a remote peer
Variants
An IPv4 address/port on which the peer is listening.
An IPv6 address/port on which the peer is listening.
Fields of IPv6
An old-style Tor onion address/port on which the peer is listening.
Fields of OnionV2
A new-style Tor onion address/port on which the peer is listening. To create the human-readable “hostname”, concatenate ed25519_pubkey, checksum, and version, wrap as base32 and append “.onion”.
Fields of OnionV3
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Reads a Self in from the given Read
Writes self out to the given Writer
Writes self out to a Vec
Writes self out to a Vec
Gets the length of this object after it has been serialized. This can be overridden to optimize cases where we prepend an object with its length. Read more
Auto Trait Implementations
impl RefUnwindSafe for NetAddress
impl Send for NetAddress
impl Sync for NetAddress
impl Unpin for NetAddress
impl UnwindSafe for NetAddress
Blanket Implementations
Mutably borrows from an owned value. Read more