Struct inet2_addr::PartialNodeAddr
source · pub struct PartialNodeAddr {
pub id: NodeId,
pub addr: PartialSocketAddr,
}
Expand description
Internet P2P node address which may omit port number.
Fields§
§id: NodeId
P2P node id (node public key).
addr: PartialSocketAddr
Internet address of the node, with optional port part.
Implementations§
source§impl PartialNodeAddr
impl PartialNodeAddr
sourcepub fn new(id: NodeId, addr: PartialSocketAddr) -> PartialNodeAddr
pub fn new(id: NodeId, addr: PartialSocketAddr) -> PartialNodeAddr
Constructs new node address.
Trait Implementations§
source§impl Clone for PartialNodeAddr
impl Clone for PartialNodeAddr
source§fn clone(&self) -> PartialNodeAddr
fn clone(&self) -> PartialNodeAddr
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 moresource§impl Debug for PartialNodeAddr
impl Debug for PartialNodeAddr
source§impl Display for PartialNodeAddr
impl Display for PartialNodeAddr
source§impl FromStr for PartialNodeAddr
impl FromStr for PartialNodeAddr
source§impl Hash for PartialNodeAddr
impl Hash for PartialNodeAddr
source§impl Ord for PartialNodeAddr
impl Ord for PartialNodeAddr
source§fn cmp(&self, other: &PartialNodeAddr) -> Ordering
fn cmp(&self, other: &PartialNodeAddr) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<PartialNodeAddr> for PartialNodeAddr
impl PartialEq<PartialNodeAddr> for PartialNodeAddr
source§fn eq(&self, other: &PartialNodeAddr) -> bool
fn eq(&self, other: &PartialNodeAddr) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<PartialNodeAddr> for PartialNodeAddr
impl PartialOrd<PartialNodeAddr> for PartialNodeAddr
source§fn partial_cmp(&self, other: &PartialNodeAddr) -> Option<Ordering>
fn partial_cmp(&self, other: &PartialNodeAddr) -> Option<Ordering>
1.0.0 · source§fn 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