1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
#![cfg_attr(test, allow(dead_code))] use crate::platform::Caps; #[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] #[non_exhaustive] pub enum RapidHashKernelId { Portable = 0, } impl RapidHashKernelId { #[inline] #[must_use] pub const fn as_str(self) -> &'static str { match self { Self::Portable => "portable", } } } #[must_use] pub fn hash64_fn(id: RapidHashKernelId) -> fn(&[u8], u64) -> u64 { match id { RapidHashKernelId::Portable => super::rapidhash_v3_with_seed, } } #[inline] #[must_use] pub const fn required_caps(id: RapidHashKernelId) -> Caps { match id { RapidHashKernelId::Portable => Caps::NONE, } }