Struct kademlia_routing_table::NodeInfo [] [src]

pub struct NodeInfo<T, U> where U: Eq + Hash {
    pub public_id: T,
    pub connections: HashSet<U>,
    // some fields omitted
}

A routing table entry representing a node and the connections to that node.

Fields

public_id: T

The information identifying the node.

connections: HashSet<U>

The connections to the node, e. g. sockets or other kinds of connection handles.

Methods

impl<T, U> NodeInfo<T, U> where T: PartialEq + HasName + Debug, U: Eq + Hash
[src]

fn new<V>(public_id: T, connections: V) -> NodeInfo<T, U> where V: IntoIterator<Item=U>

Creates a new node entry with the given ID and connections.

fn name(&self) -> &XorName

Returns the XorName of the peer node.

Trait Implementations

impl<T: Eq, U: Eq> Eq for NodeInfo<T, U> where U: Eq + Hash
[src]

impl<T: PartialEq, U: PartialEq> PartialEq for NodeInfo<T, U> where U: Eq + Hash
[src]

fn eq(&self, __arg_0: &NodeInfo<T, U>) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &NodeInfo<T, U>) -> bool

This method tests for !=.

impl<T: Debug, U: Debug> Debug for NodeInfo<T, U> where U: Eq + Hash
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<T: Clone, U: Clone> Clone for NodeInfo<T, U> where U: Eq + Hash
[src]

fn clone(&self) -> NodeInfo<T, U>

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more