pub struct HashEntry {
pub key_hash: i64,
pub value_hash: i64,
pub key_bytes: [u8; 4],
pub value_bytes: [u8; 4],
}Expand description
A hash entry for map sorting.
Vanilla Minecraft hashes each key and value, then sorts by these hashes, and writes ONLY the 4-byte hash values (not the original encoded bytes) to the final hasher.
Fields§
§key_hash: i64The hash of the key data (for sorting).
value_hash: i64The hash of the value data (for sorting).
key_bytes: [u8; 4]The 4-byte CRC32C hash of the key (to be written to the final hasher).
value_bytes: [u8; 4]The 4-byte CRC32C hash of the value (to be written to the final hasher).
Implementations§
Source§impl HashEntry
impl HashEntry
Sourcepub fn new(key_hasher: ComponentHasher, value_hasher: ComponentHasher) -> Self
pub fn new(key_hasher: ComponentHasher, value_hasher: ComponentHasher) -> Self
Creates a new hash entry.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HashEntry
impl RefUnwindSafe for HashEntry
impl Send for HashEntry
impl Sync for HashEntry
impl Unpin for HashEntry
impl UnsafeUnpin for HashEntry
impl UnwindSafe for HashEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more