Enum breez_sdk_liquid::lightning::ln::msgs::NetAddress
pub enum NetAddress {
IPv4 {
addr: [u8; 4],
port: u16,
},
IPv6 {
addr: [u8; 16],
port: u16,
},
OnionV2([u8; 12]),
OnionV3 {
ed25519_pubkey: [u8; 32],
checksum: u16,
version: u8,
port: u16,
},
Hostname {
hostname: Hostname,
port: u16,
},
}
Expand description
An address which can be used to connect to a remote peer.
Variants§
IPv4
An IPv4 address/port on which the peer is listening.
IPv6
An IPv6 address/port on which the peer is listening.
OnionV2([u8; 12])
An old-style Tor onion address/port on which the peer is listening.
This field is deprecated and the Tor network generally no longer supports V2 Onion addresses. Thus, the details are not parsed here.
OnionV3
A new-style Tor onion address/port on which the peer is listening.
To create the human-readable “hostname”, concatenate the ED25519 pubkey, checksum, and version, wrap as base32 and append “.onion”.
Fields
Hostname
A hostname/port on which the peer is listening.
Trait Implementations§
§impl Clone for NetAddress
impl Clone for NetAddress
§fn clone(&self) -> NetAddress
fn clone(&self) -> NetAddress
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 more§impl Debug for NetAddress
impl Debug for NetAddress
§impl PartialEq for NetAddress
impl PartialEq for NetAddress
§fn eq(&self, other: &NetAddress) -> bool
fn eq(&self, other: &NetAddress) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl Readable for NetAddress
impl Readable for NetAddress
§fn read<R>(reader: &mut R) -> Result<NetAddress, DecodeError>where
R: Read,
fn read<R>(reader: &mut R) -> Result<NetAddress, DecodeError>where
R: Read,
Reads a
Self
in from the given Read
.§impl Writeable for NetAddress
impl Writeable for NetAddress
impl Eq for NetAddress
impl StructuralPartialEq for NetAddress
Auto Trait Implementations§
impl Freeze for NetAddress
impl RefUnwindSafe for NetAddress
impl Send for NetAddress
impl Sync for NetAddress
impl Unpin for NetAddress
impl UnwindSafe for NetAddress
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§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.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request