Struct xxhash2::Hash32
[−]
[src]
pub struct Hash32 { /* fields omitted */ }
Canonical representation of a 32-bit hash.
This structure provides a conversion from a 32-bit hash value to a list of bytes in a canonical format. Note that the bytes returned are not necessarily hex.
Methods
impl Hash32
[src]
fn bytes(&self) -> &[u8; 4]
Returns the underlying hash as a list of bytes in a canonical representation.
fn value(&self) -> u32
Returns this canonical hash value as a 32-bit integer.
Converts from the underlying list of bytes to an integer.
Trait Implementations
impl From<u32> for Hash32
[src]
fn from(val: u32) -> Hash32
Creates a new canonical representation of a 32-bit hash value.
The returned value can be viewed as a list of bytes.
impl From<[u8; 4]> for Hash32
[src]
fn from(val: [u8; 4]) -> Hash32
Creates a new canonical representation of a hash from the 4-byte canonical representation.
The returned value can be viewed as a u32
.