pub trait HasherImpl {
type Output: AsRef<[u8]>;
const NAME: &'static str;
// Required methods
fn create_hasher() -> Self;
fn hash(&mut self, val: &[u8]);
fn result(self) -> Self::Output;
fn get_base_cost(compute_budget: &ComputeBudget) -> u64;
fn get_byte_cost(compute_budget: &ComputeBudget) -> u64;
fn get_max_slices(compute_budget: &ComputeBudget) -> u64;
}
Required Associated Constants§
Required Associated Types§
Required Methods§
fn create_hasher() -> Self
fn hash(&mut self, val: &[u8])
fn result(self) -> Self::Output
fn get_base_cost(compute_budget: &ComputeBudget) -> u64
fn get_byte_cost(compute_budget: &ComputeBudget) -> u64
fn get_max_slices(compute_budget: &ComputeBudget) -> u64
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.