Skip to main content

ReflectHash

Trait ReflectHash 

Source
pub trait ReflectHash {
    const HASH: [u8; 32];
}
Expand description

Core trait for computing structural compile-time hashes.

Types implementing this trait can be hashed at compile time to produce a unique 32-byte identifier based solely on their structure, not their names.

§Deriving

Most types should use #[derive(ReflectHash)] which automatically generates the correct implementation based on the type’s structure.

Required Associated Constants§

Source

const HASH: [u8; 32]

The 256-bit structural hash of this type, computed at compile time.

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 ReflectHash for bool

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for char

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for i8

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for i16

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for i32

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for i64

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for i128

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for str

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for u8

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for u16

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for u32

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for u64

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for u128

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for ()

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for String

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for NonZeroU256

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for ActorId

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for CodeId

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for MessageId

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for H160

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for H256

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for U256

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for NonZeroI8

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for NonZeroI16

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for NonZeroI32

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for NonZeroI64

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for NonZeroI128

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for NonZeroU8

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for NonZeroU16

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for NonZeroU32

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for NonZeroU64

Source§

const HASH: [u8; 32]

Source§

impl ReflectHash for NonZeroU128

Source§

const HASH: [u8; 32]

Source§

impl<K: ReflectHash, V: ReflectHash> ReflectHash for BTreeMap<K, V>

Source§

const HASH: [u8; 32]

Source§

impl<T0: ReflectHash, T1: ReflectHash, T2: ReflectHash, T3: ReflectHash, T4: ReflectHash, T5: ReflectHash, T6: ReflectHash, T7: ReflectHash, T8: ReflectHash, T9: ReflectHash, T10: ReflectHash, T11: ReflectHash> ReflectHash for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

Source§

const HASH: [u8; 32]

Source§

impl<T1: ReflectHash, T2: ReflectHash, T3: ReflectHash, T4: ReflectHash, T5: ReflectHash, T6: ReflectHash, T7: ReflectHash, T8: ReflectHash, T9: ReflectHash, T10: ReflectHash, T11: ReflectHash> ReflectHash for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

Source§

const HASH: [u8; 32]

Source§

impl<T2: ReflectHash, T3: ReflectHash, T4: ReflectHash, T5: ReflectHash, T6: ReflectHash, T7: ReflectHash, T8: ReflectHash, T9: ReflectHash, T10: ReflectHash, T11: ReflectHash> ReflectHash for (T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

Source§

const HASH: [u8; 32]

Source§

impl<T3: ReflectHash, T4: ReflectHash, T5: ReflectHash, T6: ReflectHash, T7: ReflectHash, T8: ReflectHash, T9: ReflectHash, T10: ReflectHash, T11: ReflectHash> ReflectHash for (T3, T4, T5, T6, T7, T8, T9, T10, T11)

Source§

const HASH: [u8; 32]

Source§

impl<T4: ReflectHash, T5: ReflectHash, T6: ReflectHash, T7: ReflectHash, T8: ReflectHash, T9: ReflectHash, T10: ReflectHash, T11: ReflectHash> ReflectHash for (T4, T5, T6, T7, T8, T9, T10, T11)

Source§

const HASH: [u8; 32]

Source§

impl<T5: ReflectHash, T6: ReflectHash, T7: ReflectHash, T8: ReflectHash, T9: ReflectHash, T10: ReflectHash, T11: ReflectHash> ReflectHash for (T5, T6, T7, T8, T9, T10, T11)

Source§

const HASH: [u8; 32]

Source§

impl<T6: ReflectHash, T7: ReflectHash, T8: ReflectHash, T9: ReflectHash, T10: ReflectHash, T11: ReflectHash> ReflectHash for (T6, T7, T8, T9, T10, T11)

Source§

const HASH: [u8; 32]

Source§

impl<T7: ReflectHash, T8: ReflectHash, T9: ReflectHash, T10: ReflectHash, T11: ReflectHash> ReflectHash for (T7, T8, T9, T10, T11)

Source§

const HASH: [u8; 32]

Source§

impl<T8: ReflectHash, T9: ReflectHash, T10: ReflectHash, T11: ReflectHash> ReflectHash for (T8, T9, T10, T11)

Source§

const HASH: [u8; 32]

Source§

impl<T9: ReflectHash, T10: ReflectHash, T11: ReflectHash> ReflectHash for (T9, T10, T11)

Source§

const HASH: [u8; 32]

Source§

impl<T10: ReflectHash, T11: ReflectHash> ReflectHash for (T10, T11)

Source§

const HASH: [u8; 32]

Source§

impl<T11: ReflectHash> ReflectHash for (T11,)

Source§

const HASH: [u8; 32]

Source§

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

Source§

const HASH: [u8; 32] = T::HASH

Source§

impl<T: ReflectHash + ?Sized> ReflectHash for &mut T

Source§

const HASH: [u8; 32] = T::HASH

Source§

impl<T: ReflectHash> ReflectHash for Option<T>

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 0]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 1]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 2]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 3]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 4]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 5]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 6]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 7]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 8]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 9]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 10]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 11]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 12]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 13]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 14]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 15]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 16]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 17]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 18]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 19]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 20]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 21]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 22]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 23]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 24]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 25]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 26]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 27]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 28]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 29]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 30]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 31]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T; 32]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for [T]

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash> ReflectHash for Vec<T>

Source§

const HASH: [u8; 32]

Source§

impl<T: ReflectHash, E: ReflectHash> ReflectHash for Result<T, E>

Source§

const HASH: [u8; 32]

Implementors§