pub trait Hashed {
// Required method
fn hash(&self) -> &Hash256;
}Expand description
The Hashed trait indicates, that the hash over some data was already calculated and saved.
Datatypes that internally save their hash can implement this, so that the hash does not need to be re-calculated
everytime we ask for it.
Note: All types that implement Hashed automatically implement Hashable,
since they can always return a copy of the internally saved hash.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".