Trait proof_of_sql::base::scalar::Scalar
source · pub trait Scalar:
Clone
+ Debug
+ Display
+ PartialEq
+ Default
+ for<'a> From<&'a str>
+ Sync
+ Send
+ One
+ Sum
+ Product
+ Sub<Output = Self>
+ Copy
+ MulAssign
+ AddAssign
+ Zero
+ for<'a> From<&'a Self>
+ for<'a> From<&'a bool>
+ for<'a> From<&'a i16>
+ for<'a> From<&'a i32>
+ for<'a> From<&'a i64>
+ for<'a> From<&'a i128>
+ TryInto<i8>
+ TryInto<i16>
+ TryInto<i32>
+ TryInto<i64>
+ TryInto<i128>
+ Into<[u64; 4]>
+ From<[u64; 4]>
+ Ord
+ Neg<Output = Self>
+ Zero
+ AddAssign
+ CanonicalSerialize
+ UniformRand
+ Inv<Output = Option<Self>>
+ SubAssign
+ RefInto<[u64; 4]>
+ for<'a> From<&'a String>
+ VarInt
+ From<String>
+ From<i128>
+ From<i64>
+ From<i32>
+ From<i16>
+ From<bool>
+ Into<BigInt>
+ TryFrom<BigInt, Error = ScalarConversionError> {
const MAX_SIGNED: Self;
const ZERO: Self;
const ONE: Self;
const TWO: Self;
// Provided method
fn signed_cmp(&self, other: &Self) -> Ordering { ... }
}
Expand description
A trait for the scalar field used in Proof of SQL.
Required Associated Constants§
sourceconst MAX_SIGNED: Self
const MAX_SIGNED: Self
The value (p - 1) / 2. This is “mid-point” of the field - the “six” on the clock. It is the largest signed value that can be represented in the field with the natural embedding.
Provided Methods§
sourcefn signed_cmp(&self, other: &Self) -> Ordering
fn signed_cmp(&self, other: &Self) -> Ordering
Compare two Scalar
s as signed numbers.
Object Safety§
This trait is not object safe.