polars_utils::total_ord

Trait TotalHash

Source
pub trait TotalHash {
    // Required method
    fn tot_hash<H>(&self, state: &mut H)
       where H: Hasher;

    // Provided method
    fn tot_hash_slice<H>(data: &[Self], state: &mut H)
       where H: Hasher,
             Self: Sized { ... }
}
Expand description

Alternative trait for Hash. By consistently using this we can still be generic w.r.t Hash while being able to hash floats.

Required Methods§

Source

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Provided Methods§

Source

fn tot_hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

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 TotalHash for &str

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl TotalHash for &[u8]

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl TotalHash for bool

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl TotalHash for char

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl TotalHash for f32

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl TotalHash for f64

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl TotalHash for i8

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl TotalHash for i16

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl TotalHash for i32

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl TotalHash for i64

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl TotalHash for i128

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl TotalHash for isize

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl TotalHash for u8

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl TotalHash for u16

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl TotalHash for u32

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl TotalHash for u64

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl TotalHash for u128

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl TotalHash for usize

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl TotalHash for String

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl<T: TotalHash + ?Sized> TotalHash for &T

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Source§

impl<T: TotalHash> TotalHash for Option<T>

Source§

fn tot_hash<H>(&self, state: &mut H)
where H: Hasher,

Implementors§