Struct xstack_kad::Key
source · pub struct Key(/* private fields */);Expand description
A kad key with 256 bits length.
Implementations§
Trait Implementations§
source§impl KBucketKey for Key
impl KBucketKey for Key
source§fn for_distance(&self, distance: Distance) -> Self
fn for_distance(&self, distance: Distance) -> Self
Returns the uniquely determined key with the given distance to self.
This implements the following equivalence:
self xor other = distance <==> other = self xor distance
source§fn longest_common_prefix(&self, rhs: &Self) -> usize
fn longest_common_prefix(&self, rhs: &Self) -> usize
Returns the longest common prefix length with rhs.
type Length = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>
type Distance = Distance
source§impl Ord for Key
impl Ord for Key
source§impl PartialOrd for Key
impl PartialOrd for Key
impl Copy for Key
impl Eq for Key
impl StructuralPartialEq for Key
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnwindSafe for Key
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)