pub trait Bucketable:
Sized
+ Eq
+ Clone {
type Discriminant: Ord + AsRef<[u8]>;
// Required method
fn discriminant(&self) -> Self::Discriminant;
}
Expand description
A discriminant that can be computed from the type.
Required Associated Types§
Sourcetype Discriminant: Ord + AsRef<[u8]>
type Discriminant: Ord + AsRef<[u8]>
The type of the discriminant being used in the Binary tree.
Required Methods§
Sourcefn discriminant(&self) -> Self::Discriminant
fn discriminant(&self) -> Self::Discriminant
Method that can compute the discriminant from the item.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl Bucketable for Ipv4Addr
impl Bucketable for Ipv4Addr
Source§type Discriminant = [u8; 2]
type Discriminant = [u8; 2]
We are discriminating by /16
subnets.