Skip to main content

CRHF

Trait CRHF 

Source
pub trait CRHF {
    type Input: ?Sized;
    type Output: Clone + PartialEq + Eq + Hash + Debug + CanonicalSerialize + CanonicalDeserialize;
    type Error: Error;

    // Required method
    fn evaluate<T: Borrow<Self::Input>>(
        input: T,
    ) -> Result<Self::Output, Self::Error>;
}
Expand description

A trait for CRHF (based on ark-primitives’ definition, but self-declared for minimal dependency and easier future upgradability.)

Required Associated Types§

Source

type Input: ?Sized

Input to the CRHF, allowed to be dynamically sized

Source

type Output: Clone + PartialEq + Eq + Hash + Debug + CanonicalSerialize + CanonicalDeserialize

Output of the CRHF

Source

type Error: Error

Error type

Required Methods§

Source

fn evaluate<T: Borrow<Self::Input>>( input: T, ) -> Result<Self::Output, Self::Error>

evaluate inputs and return hash output

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§