Struct kademlia_dht::Node [] [src]

pub struct Node {
    pub node_data: Arc<NodeData>,
    pub protocol: Arc<Protocol>,
    // some fields omitted
}

A node in the Kademlia DHT.

Fields

Methods

impl Node
[src]

[src]

Constructs a new Node on a specific ip and port, and bootstraps the node with an existing node if bootstrap is not None.

[src]

Inserts a key-value pair into the DHT.

[src]

Gets the value associated with a particular key in the DHT. Returns None if the key was not found.

[src]

Returns the NodeData associated with the node.

[src]

Kills the current node and all active threads.

Trait Implementations

impl Clone for Node
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Node

impl Sync for Node