Skip to main content

FieldFromRepr

Trait FieldFromRepr 

Source
pub trait FieldFromRepr: FieldOps {
    type Repr;

    // Required method
    fn from_repr(x: Self::Repr) -> Self;
}
Expand description

Trait for field types that can be constructed from a field-specific representation.

Required Associated Types§

Source

type Repr

The representation type accepted by this field.

Required Methods§

Source

fn from_repr(x: Self::Repr) -> Self

Constructs a field element from the given representation.

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§

Source§

impl FieldFromRepr for F2Element

Source§

type Repr = Uint<1>

Source§

impl<MOD, const LIMBS: usize> FieldFromRepr for FpElement<MOD, LIMBS>
where MOD: ConstPrimeMontyParams<LIMBS>,

Source§

type Repr = Uint<LIMBS>

Source§

impl<MOD, const LIMBS: usize, const M: usize, const N: usize, P, TSCONSTS> FieldFromRepr for FpExt<MOD, LIMBS, M, N, P, TSCONSTS>
where MOD: ConstPrimeMontyParams<LIMBS>, P: IrreduciblePoly<MOD, LIMBS, M>, TSCONSTS: TonelliShanksConstants<MOD, LIMBS, M, N>,

Source§

type Repr = [FpElement<MOD, LIMBS>; M]

Source§

impl<const LIMBS: usize, P> FieldFromRepr for F2Ext<LIMBS, P>
where P: BinaryIrreducible<LIMBS>,

Source§

type Repr = Uint<LIMBS>