[][src]Struct classygroup::gmp_classgroup::GmpClassGroup

pub struct GmpClassGroup { /* fields omitted */ }

Methods

impl GmpClassGroup[src]

pub fn into_raw(self) -> (Mpz, Mpz)[src]

pub fn with_context<T, U>(cb: T) -> U where
    T: FnOnce(&mut Ctx) -> U, 
[src]

Call cb with a mutable reference to the context of type Ctx.

The reference cannot escape the closure and cannot be sent across threads.

Panics

Panics if called recursively. This library guarantees that it will never call this function from any function that takes a parameter of type &mut Ctx.

Trait Implementations

impl ClassGroup for GmpClassGroup[src]

type BigNum = Mpz

fn normalize(&mut self)[src]

Normalize self.

Panics

Panics if called within a call to Self::with_context.

fn discriminant(&self) -> &Self::BigNum[src]

Returns the discriminant of self.

fn reduce(&mut self)[src]

Reduce self.

Panics

Panics if called within a call to Self::with_context.

fn square(&mut self)[src]

Square self.ClassGroupPartial

Panics

Panics if called within the scope of a call to with_context.

fn repeated_square(&mut self, iterations: u64)[src]

Square self iterations times.

Panics

Panics if called within the scope of a call to with_context.

fn identity_for_discriminant(discriminant: Self::BigNum) -> Self[src]

Computes the identity element of Self for a given discriminant. Read more

fn identity(&self) -> Self[src]

Computes the identity element of a ClassGroup.

impl PartialOrd<GmpClassGroup> for GmpClassGroup[src]

impl PartialEq<GmpClassGroup> for GmpClassGroup[src]

impl Default for GmpClassGroup[src]

impl Clone for GmpClassGroup[src]

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

Performs copy-assignment from source. Read more

impl Ord for GmpClassGroup[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

impl Eq for GmpClassGroup[src]

impl Debug for GmpClassGroup[src]

impl Hash for GmpClassGroup[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<B: Borrow<Self>> Mul<B> for GmpClassGroup[src]

type Output = Self

The resulting type after applying the * operator.

impl<'a, B: Borrow<GmpClassGroup>> Mul<B> for &'a GmpClassGroup[src]

type Output = GmpClassGroup

The resulting type after applying the * operator.

impl<B: Borrow<GmpClassGroup>> MulAssign<B> for GmpClassGroup[src]

Auto Trait Implementations

Blanket Implementations

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> From for T[src]

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> 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.

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

impl<T> Same for T

type Output = T

Should always be Self