Type Alias jormungandr::topology::Peer

source ·
pub type Peer = Gossip;
Expand description

This represents a peer and its public key used for identification in the topology.

Aliased Type§

struct Peer(Gossip);

Fields§

§0: Gossip

Implementations§

source§

impl Gossip

source

pub fn address(&self) -> Address

source

pub fn id(&self) -> NodeId

source

pub fn has_valid_address(&self) -> bool

source

pub fn is_global(&self) -> bool

Check if the bind address is a global address Note: This method relies on IPV4 checks even for IPV6 addresses. If the IPV6 address can not be transformed into a IPV4 one then the private and link_local checks are not performed on it.

Trait Implementations§

source§

impl Clone for Gossip

source§

fn clone(&self) -> Gossip

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Gossip

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deserialize for Gossip

source§

fn deserialize<R: Read>(codec: &mut Codec<R>) -> Result<Self, ReadError>

source§

fn deserialize_validate<R>(codec: &mut Codec<R>) -> Result<(), ReadError>where R: Read,

source§

impl Encode for Gossip

§

type NetworkData = Node

source§

fn encode(&self) -> Self::NetworkData

source§

impl From<Gossip> for Gossip

source§

fn from(profile: Gossip) -> Self

Converts to this type from the input type.
source§

impl Hash for Gossip

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<Gossip> for Gossip

source§

fn eq(&self, other: &Gossip) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Gossip

source§

fn serialize<W: Write>(&self, codec: &mut Codec<W>) -> Result<(), WriteError>

source§

fn serialized_size(&self) -> usize

Default implementation, not efficient, not recommended to use it
source§

fn serialize_as_vec(&self) -> Result<Vec<u8, Global>, WriteError>

Convenience method to serialize into a byte vector.
source§

impl Eq for Gossip

source§

impl StructuralEq for Gossip

source§

impl StructuralPartialEq for Gossip