Struct kaspa_utils::networking::PrefixBucket
source · pub struct PrefixBucket(/* private fields */);Expand description
A bucket based on an ip’s prefix bytes. for ipv4 it consists of 6 leading zero bytes, and the first two octets, for ipv6 it consists of the first 8 octets, encoded into a big endian u64.
Implementations§
Trait Implementations§
source§impl Clone for PrefixBucket
impl Clone for PrefixBucket
source§fn clone(&self) -> PrefixBucket
fn clone(&self) -> PrefixBucket
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for PrefixBucket
impl Debug for PrefixBucket
source§impl From<&IpAddress> for PrefixBucket
impl From<&IpAddress> for PrefixBucket
source§impl From<&NetAddress> for PrefixBucket
impl From<&NetAddress> for PrefixBucket
source§fn from(net_address: &NetAddress) -> Self
fn from(net_address: &NetAddress) -> Self
Converts to this type from the input type.
source§impl Hash for PrefixBucket
impl Hash for PrefixBucket
source§impl PartialEq for PrefixBucket
impl PartialEq for PrefixBucket
source§fn eq(&self, other: &PrefixBucket) -> bool
fn eq(&self, other: &PrefixBucket) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for PrefixBucket
impl Eq for PrefixBucket
impl StructuralEq for PrefixBucket
impl StructuralPartialEq for PrefixBucket
Auto Trait Implementations§
impl RefUnwindSafe for PrefixBucket
impl Send for PrefixBucket
impl Sync for PrefixBucket
impl Unpin for PrefixBucket
impl UnwindSafe for PrefixBucket
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