[][src]Struct kad::table::kbucket::KBucket

pub struct KBucket<Id, Info> { /* fields omitted */ }

KBucket implementation This implements a single bucket for use in the KNodeTable implementation

Methods

impl<Id, Info> KBucket<Id, Info> where
    Id: DatabaseId + 'static,
    Info: Clone + Debug + 'static, 
[src]

pub fn new(bucket_size: usize) -> KBucket<Id, Info>[src]

Create a new KBucket with the given size

pub fn update(&mut self, node: &Entry<Id, Info>) -> bool[src]

Update a node in the bucket

pub fn find(&self, id: &Id) -> Option<Entry<Id, Info>>[src]

Find a node in the bucket

Auto Trait Implementations

impl<Id, Info> Send for KBucket<Id, Info> where
    Id: Send,
    Info: Send

impl<Id, Info> Sync for KBucket<Id, Info> where
    Id: Send + Sync,
    Info: Send + Sync

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.