pub fn hash<T: Serialize>(t: &T) -> Hash
Hash data using SHA-256.
Internally, this first serializes the given type using serialize then hashes the resulting slice of bytes using the Sha256 digest.
serialize
Sha256