Skip to main content

Hashable

Trait Hashable 

Source
pub trait Hashable: PartialEq {
    // Required method
    fn get_hash(&self) -> u32;
}

Required Methods§

Source

fn get_hash(&self) -> u32

Returns the hash value of the element

This function should provide fast, simple hash computation

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Hashable for String

Source§

fn get_hash(&self) -> u32

Source§

impl Hashable for [u8]

Source§

fn get_hash(&self) -> u32

Source§

impl Hashable for i32

Source§

fn get_hash(&self) -> u32

Source§

impl Hashable for str

Source§

fn get_hash(&self) -> u32

Source§

impl Hashable for u32

Source§

fn get_hash(&self) -> u32

Source§

impl Hashable for usize

Source§

fn get_hash(&self) -> u32

Implementors§