pub struct RemoteNodeAddr {
pub node_id: PublicKey,
pub remote_addr: RemoteSocketAddr,
}
Expand description
Remote node address at the session-level including node encryption/id key
information and full RemoteSocketAddr
with transport protocol & complete
connection point specification.
Node address must be given as in form of
<node_id>@<node_inet_addr>\[:<port>\]
, where <node_inet_addr> may be
IPv4, IPv6, Onion v2 or v3 address
Fields
node_id: PublicKey
Node public key, used both as an ID and encryption key for per-session ECDH
remote_addr: RemoteSocketAddr
Full remote peer address including port information
Trait Implementations
sourceimpl Clone for RemoteNodeAddr
impl Clone for RemoteNodeAddr
sourcefn clone(&self) -> RemoteNodeAddr
fn clone(&self) -> RemoteNodeAddr
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RemoteNodeAddr
impl Debug for RemoteNodeAddr
sourceimpl Display for RemoteNodeAddr
impl Display for RemoteNodeAddr
sourceimpl From<&'_ RemoteNodeAddr> for Url
impl From<&'_ RemoteNodeAddr> for Url
sourcefn from(addr: &RemoteNodeAddr) -> Self
fn from(addr: &RemoteNodeAddr) -> Self
Converts to this type from the input type.
sourceimpl From<RemoteNodeAddr> for NodeAddr
impl From<RemoteNodeAddr> for NodeAddr
sourcefn from(addr: RemoteNodeAddr) -> Self
fn from(addr: RemoteNodeAddr) -> Self
Converts to this type from the input type.
sourceimpl From<RemoteNodeAddr> for Url
impl From<RemoteNodeAddr> for Url
sourcefn from(addr: RemoteNodeAddr) -> Self
fn from(addr: RemoteNodeAddr) -> Self
Converts to this type from the input type.
sourceimpl From<RemoteNodeAddr> for RemoteSocketAddr
impl From<RemoteNodeAddr> for RemoteSocketAddr
sourcefn from(addr: RemoteNodeAddr) -> RemoteSocketAddr
fn from(addr: RemoteNodeAddr) -> RemoteSocketAddr
Converts to this type from the input type.
sourceimpl From<RemoteNodeAddr> for PartialNodeAddr
impl From<RemoteNodeAddr> for PartialNodeAddr
sourcefn from(node_addr: RemoteNodeAddr) -> PartialNodeAddr
fn from(node_addr: RemoteNodeAddr) -> PartialNodeAddr
Converts to this type from the input type.
sourceimpl FromStr for RemoteNodeAddr
impl FromStr for RemoteNodeAddr
sourceimpl Hash for RemoteNodeAddr
impl Hash for RemoteNodeAddr
sourceimpl Ord for RemoteNodeAddr
impl Ord for RemoteNodeAddr
sourceimpl PartialEq<RemoteNodeAddr> for RemoteNodeAddr
impl PartialEq<RemoteNodeAddr> for RemoteNodeAddr
sourcefn eq(&self, other: &RemoteNodeAddr) -> bool
fn eq(&self, other: &RemoteNodeAddr) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RemoteNodeAddr) -> bool
fn ne(&self, other: &RemoteNodeAddr) -> bool
This method tests for !=
.
sourceimpl PartialOrd<RemoteNodeAddr> for RemoteNodeAddr
impl PartialOrd<RemoteNodeAddr> for RemoteNodeAddr
sourcefn partial_cmp(&self, other: &RemoteNodeAddr) -> Option<Ordering>
fn partial_cmp(&self, other: &RemoteNodeAddr) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl StrictDecode for RemoteNodeAddr
impl StrictDecode for RemoteNodeAddr
sourcefn strict_decode<D: Read>(d: D) -> Result<Self, Error>
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
Decode with the given std::io::Read
instance; must either
construct an instance or return implementation-specific error type. Read more
sourcefn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
Tries to deserialize byte array into the current type using
StrictDecode::strict_decode
Read more
sourceimpl StrictEncode for RemoteNodeAddr
impl StrictEncode for RemoteNodeAddr
sourcefn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
Encode with the given std::io::Write
instance; must return result
with either amount of bytes encoded – or implementation-specific
error type. Read more
sourcefn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>
fn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>
Serializes data as a byte array using StrictEncode::strict_encode
function Read more
sourceimpl ToNodeAddr for RemoteNodeAddr
impl ToNodeAddr for RemoteNodeAddr
sourcefn to_node_addr(&self, default_port: u16) -> Option<NodeAddr>
fn to_node_addr(&self, default_port: u16) -> Option<NodeAddr>
Constructs NodeAddr
from an internal data with a default port
put in place when the port details were not given is such structures
as PartialNodeAddr
Read more
sourceimpl ToRemoteNodeAddr for RemoteNodeAddr
impl ToRemoteNodeAddr for RemoteNodeAddr
sourcefn to_remote_node_addr(&self, default_port: u16) -> Option<RemoteNodeAddr>
fn to_remote_node_addr(&self, default_port: u16) -> Option<RemoteNodeAddr>
Constructs RemoteNodeAddr
from an internal data with a default port
put in place when the port details were not given is such structures
as PartialNodeAddr
Read more
sourceimpl TryFrom<PartialNodeAddr> for RemoteNodeAddr
impl TryFrom<PartialNodeAddr> for RemoteNodeAddr
sourceimpl TryFrom<Url> for RemoteNodeAddr
impl TryFrom<Url> for RemoteNodeAddr
sourceimpl UrlString for RemoteNodeAddr
impl UrlString for RemoteNodeAddr
sourcefn url_scheme(&self) -> &'static str
fn url_scheme(&self) -> &'static str
Returns full URL scheme string (i.e. including :
or ://
parts)
corresponding to the provided address Read more
sourcefn to_url_string(&self) -> String
fn to_url_string(&self) -> String
Returns URL string representation for a given node or socket address. If
you need full URL address, please use Url::from()
instead (this
will require url
feature for LNP/BP Core Library). Read more
impl Eq for RemoteNodeAddr
impl StructuralEq for RemoteNodeAddr
impl StructuralPartialEq for RemoteNodeAddr
Auto Trait Implementations
impl RefUnwindSafe for RemoteNodeAddr
impl Send for RemoteNodeAddr
impl Sync for RemoteNodeAddr
impl Unpin for RemoteNodeAddr
impl UnwindSafe for RemoteNodeAddr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more