pub trait PoseidonInstructions<F: ScalarField> {
// Required methods
fn hash_var_len_bytes<const MAX_LEN: usize>(
&self,
ctx: &mut Context<F>,
inputs: &VarLenBytes<F, MAX_LEN>,
) -> AssignedValue<F>
where F: BigPrimeField;
fn hash_var_len_bytes_vec(
&self,
ctx: &mut Context<F>,
inputs: &VarLenBytesVec<F>,
) -> AssignedValue<F>
where F: BigPrimeField;
fn hash_fix_len_bytes<const MAX_LEN: usize>(
&self,
ctx: &mut Context<F>,
inputs: &FixLenBytes<F, MAX_LEN>,
) -> AssignedValue<F>
where F: BigPrimeField;
}
Expand description
Trait for Poseidon instructions
Required Methods§
Sourcefn hash_var_len_bytes<const MAX_LEN: usize>(
&self,
ctx: &mut Context<F>,
inputs: &VarLenBytes<F, MAX_LEN>,
) -> AssignedValue<F>where
F: BigPrimeField,
fn hash_var_len_bytes<const MAX_LEN: usize>(
&self,
ctx: &mut Context<F>,
inputs: &VarLenBytes<F, MAX_LEN>,
) -> AssignedValue<F>where
F: BigPrimeField,
Return hash of a VarLenBytes
Sourcefn hash_var_len_bytes_vec(
&self,
ctx: &mut Context<F>,
inputs: &VarLenBytesVec<F>,
) -> AssignedValue<F>where
F: BigPrimeField,
fn hash_var_len_bytes_vec(
&self,
ctx: &mut Context<F>,
inputs: &VarLenBytesVec<F>,
) -> AssignedValue<F>where
F: BigPrimeField,
Return hash of a VarLenBytesVec
Sourcefn hash_fix_len_bytes<const MAX_LEN: usize>(
&self,
ctx: &mut Context<F>,
inputs: &FixLenBytes<F, MAX_LEN>,
) -> AssignedValue<F>where
F: BigPrimeField,
fn hash_fix_len_bytes<const MAX_LEN: usize>(
&self,
ctx: &mut Context<F>,
inputs: &FixLenBytes<F, MAX_LEN>,
) -> AssignedValue<F>where
F: BigPrimeField,
Return hash of a FixLenBytes
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.