Struct dht::Node [] [src]

pub struct Node {
    pub address: SocketAddr,
    pub id: BigUint,
}

Structure representing a node in system.

Every node has an address (IP and port) and a numeric ID, which is used to calculate metrics and look up data.

Fields

address: SocketAddr

Network address of the node.

id: BigUint

ID of the node.

Trait Implementations

impl Debug for Node
[src]

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

Formats the value using the given formatter.

impl Clone for Node
[src]

fn clone(&self) -> Node

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

impl Encodable for Node
[src]

fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>

impl Decodable for Node
[src]

fn decode<D: Decoder>(d: &mut D) -> Result<Node, D::Error>