pub struct Node { /* private fields */ }
Expand description
A node in the Kademlia DHT.
Implementations§
Source§impl Node
impl Node
Sourcepub fn new(ip: &str, port: &str, bootstrap: Option<NodeData>) -> Self
pub fn new(ip: &str, port: &str, bootstrap: Option<NodeData>) -> Self
Constructs a new Node
on a specific ip and port, and bootstraps the node with an existing
node if bootstrap
is not None
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more