Trait hotshot_stake_table::utils::ToFields

source ·
pub trait ToFields<F: Field> {
    const SIZE: usize;

    // Required method
    fn to_fields(&self) -> Vec<F>;
}
Expand description

A trait that converts into a field element.

Required Associated Constants§

source

const SIZE: usize

The number of field elements needed to represent the given struct.

Required Methods§

source

fn to_fields(&self) -> Vec<F>

Convert the given struct into a list of field elements.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ToFields<Fp<MontBackend<FqConfig, 4>, 4>> for Fq

source§

const SIZE: usize = 1usize

source§

fn to_fields(&self) -> Vec<Fq>

Implementors§

source§

impl ToFields<Fp<MontBackend<FqConfig, 4>, 4>> for VerKey

source§

const SIZE: usize = 2usize

source§

impl ToFields<Fp<MontBackend<FrConfig, 4>, 4>> for QCVerKey

source§

const SIZE: usize = 3usize

source§

impl ToFields<Fp<MontBackend<FrConfig, 4>, 4>> for StateVerKey

Hashable representation of a key NOTE: commitment is only used in light client contract. For this application, we needs only hash the Schnorr verification key.

source§

const SIZE: usize = 2usize