[−][src]Struct kad::nodetable::kbucket::KBucket
KBucket implementation This implements a single bucket for use in the KNodeTable implementation
Methods
impl<Id, Addr> KBucket<Id, Addr> where
Id: DatabaseId + 'static,
Addr: Clone + Debug + 'static,
[src]
Id: DatabaseId + 'static,
Addr: Clone + Debug + 'static,
pub fn new(bucket_size: usize) -> KBucket<Id, Addr>
[src]
Create a new KBucket with the given size
pub fn update(&mut self, node: &Node<Id, Addr>) -> bool
[src]
Update a node in the bucket
pub fn find(&self, id: &Id) -> Option<Node<Id, Addr>>
[src]
Find a node in the bucket
Auto Trait Implementations
impl<Id, Addr> Send for KBucket<Id, Addr> where
Addr: Send,
Id: Send,
Addr: Send,
Id: Send,
impl<Id, Addr> Sync for KBucket<Id, Addr> where
Addr: Send + Sync,
Id: Send + Sync,
Addr: Send + Sync,
Id: Send + Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,