pub struct RoutingTable { /* private fields */ }Implementations§
Source§impl RoutingTable
impl RoutingTable
pub fn new(our_id: NodeId) -> Self
pub fn our_id(&self) -> &NodeId
pub fn add_node(&self, node: Node)
pub fn remove_node(&self, id: &NodeId)
pub fn mark_failed(&self, id: &NodeId)
pub fn mark_seen(&self, id: &NodeId)
pub fn find_closest(&self, target: &NodeId, count: usize) -> Vec<Node>
pub fn node_count(&self) -> usize
pub fn all_nodes(&self) -> Vec<Node>
pub fn find_node(&self, id: &NodeId) -> Option<Node>
pub fn find_by_addr(&self, addr: &SocketAddr) -> Option<Node>
pub fn stale_buckets(&self) -> Vec<usize>
Auto Trait Implementations§
impl Freeze for RoutingTable
impl !RefUnwindSafe for RoutingTable
impl Send for RoutingTable
impl Sync for RoutingTable
impl Unpin for RoutingTable
impl UnwindSafe for RoutingTable
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