pub trait PrimeField:
PrimeFieldParams
+ SqrtField
+ FromStr
+ From<&'static str>
+ Borsh {
// Required methods
fn from_uint(v: Self::Inner) -> Option<Self>;
fn from_mont_uint(v: Self::Inner) -> Option<Self>;
fn from_uint_unchecked(v: Self::Inner) -> Self;
fn from_mont_uint_unchecked(v: Self::Inner) -> Self;
fn to_uint(&self) -> Self::Inner;
fn to_mont_uint(&self) -> Self::Inner;
fn as_mont_uint(&self) -> &Self::Inner;
fn as_mont_uint_mut(&mut self) -> &mut Self::Inner;
// Provided methods
fn to_other<Fq: PrimeField>(&self) -> Option<Fq> { ... }
fn to_other_reduced<Fq: PrimeField>(&self) -> Fq { ... }
}Required Methods§
fn from_uint(v: Self::Inner) -> Option<Self>
fn from_mont_uint(v: Self::Inner) -> Option<Self>
fn from_uint_unchecked(v: Self::Inner) -> Self
fn from_mont_uint_unchecked(v: Self::Inner) -> Self
fn to_uint(&self) -> Self::Inner
fn to_mont_uint(&self) -> Self::Inner
fn as_mont_uint(&self) -> &Self::Inner
fn as_mont_uint_mut(&mut self) -> &mut Self::Inner
Provided Methods§
fn to_other<Fq: PrimeField>(&self) -> Option<Fq>
fn to_other_reduced<Fq: PrimeField>(&self) -> Fq
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.