[][src]Struct g2poly::G2PolyProd

pub struct G2PolyProd(pub u128);

The result of multiplying two G2Poly

This type is used to represent the result of multiplying two G2Polys. Since this could overflow when relying on just a u64, this type uses an internal u128. The only operation implemented on this type is % which reduces the result back to a G2Poly.

let a = G2Poly(0xff_00_00_00_00_00_00_00);
assert_eq!(a * a, G2PolyProd(0x55_55_00_00_00_00_00_00_00_00_00_00_00_00_00_00));
assert_eq!(a * a % G2Poly(0b100), G2Poly(0));

Trait Implementations

impl Ord for G2PolyProd[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Returns max if self is greater than max, and min if self is less than min. Otherwise this will return self. Panics if min > max. Read more

impl Eq for G2PolyProd[src]

impl PartialOrd<G2PolyProd> for G2PolyProd[src]

impl Copy for G2PolyProd[src]

impl PartialEq<G2PolyProd> for G2PolyProd[src]

impl Clone for G2PolyProd[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for G2PolyProd[src]

impl Rem<G2Poly> for G2PolyProd[src]

type Output = G2Poly

The resulting type after applying the % operator.

Auto Trait Implementations

impl Send for G2PolyProd

impl Sync for G2PolyProd

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.