Trait Permutation

Source
pub trait Permutation<T: Clone>: Clone + Sync {
    // Required method
    fn permute_mut(&self, input: &mut T);

    // Provided method
    fn permute(&self, input: T) -> T { ... }
}
Expand description

A permutation in the mathematical sense.

Required Methods§

Source

fn permute_mut(&self, input: &mut T)

Provided Methods§

Source

fn permute(&self, input: T) -> T

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.

Implementors§

impl<T: Clone, P: Permutation<T>> Permutation<T> for Instrumented<P>

impl Permutation<[u64; 25]> for KeccakF

impl Permutation<[u8; 200]> for KeccakF

impl Permutation<[[u64; 1]; 25]> for KeccakF

impl<FA, const N: usize> Permutation<[FA; N]> for CosetMds<FA::F, N>
where FA: FieldAlgebra, FA::F: TwoAdicField,

impl<FA: FieldAlgebra, const N: usize> Permutation<[FA; N]> for IntegratedCosetMds<FA::F, N>

impl<FA, Mds, const WIDTH: usize, const ALPHA: u64> Permutation<[FA; WIDTH]> for Poseidon<FA::F, Mds, WIDTH, ALPHA>
where FA: FieldAlgebra, FA::F: PrimeField, Mds: MdsPermutation<FA, WIDTH>,

impl<FA, ExternalPerm, InternalPerm, const WIDTH: usize, const D: u64> Permutation<[FA; WIDTH]> for Poseidon2<<FA::F as Field>::Packing, ExternalPerm, InternalPerm, WIDTH, D>
where FA: FieldAlgebra + Sync, FA::F: PrimeField, ExternalPerm: ExternalLayer<FA, WIDTH, D>, InternalPerm: InternalLayer<FA, WIDTH, D>,