[−][src]Trait libp2p_kad::kbucket::KBucketsPeerId
Trait that must be implemented on types that can be used as an identifier in a k-bucket.
Required methods
fn distance_with(&self, other: &TOther) -> u32
Computes the XOR of this value and another one. The lower the closer.
fn max_distance() -> usize
Returns then number of bits that are necessary to store the distance between peer IDs. Used for pre-allocations.
Note: Returning 0 would lead to a panic.