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
36
37
38
39
40
41
/// Represents a trait for associating a unique, compile-time constant hash with a type.
/// Retrieve a compile-time constant hash for a message type.
///
/// This hash uniquely identifies the type and can be used for version tracking,
/// serialization metadata, or message validation in distributed environments.
///
/// Usage:
/// ```
/// use motorcortex_rust::get_hash;
/// use motorcortex_rust::SessionTokenMsg;
///
/// fn main() {
/// let hash = get_hash::<SessionTokenMsg>();
/// println!("Hash for SessionTokenMsg: {hash:#x}");
/// }
/// ```
/// Retrieve the size, in bytes, of a compile-time constant hash used in the system.
///
/// # Returns
/// - A `u32` value representing the size of the constant hash (currently always 4).
///
/// # Usage
/// ```
/// use motorcortex_rust::get_hash_size;
///
/// fn main() {
/// let size = get_hash_size();
/// println!("Hash size: {size} bytes");
/// }
/// ```