[−][src]Struct classygroup::gmp_classgroup::GmpClassGroup
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]
T: FnOnce(&mut Ctx) -> U,
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]
fn inverse(&mut self)
[src]
fn serialize(&self, buf: &mut [u8]) -> Result<(), usize>
[src]
fn from_bytes(bytearray: &[u8], discriminant: Self::BigNum) -> Self
[src]
fn from_ab_discriminant(
a: Self::BigNum,
b: Self::BigNum,
discriminant: Self::BigNum
) -> Self
[src]
a: Self::BigNum,
b: Self::BigNum,
discriminant: Self::BigNum
) -> Self
fn discriminant(&self) -> &Self::BigNum
[src]
Returns the discriminant of self
.
fn size_in_bits(num: &Self::BigNum) -> usize
[src]
fn reduce(&mut self)
[src]
fn deserialize(buf: &[u8], discriminant: Self::BigNum) -> Self
[src]
fn square(&mut self)
[src]
fn unsigned_deserialize_bignum(buf: &[u8]) -> Self::BigNum
[src]
fn repeated_square(&mut self, iterations: u64)
[src]
fn generator_for_discriminant(discriminant: Self::BigNum) -> Self
[src]
fn pow(&mut self, exponent: Mpz)
[src]
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]
fn partial_cmp(&self, other: &GmpClassGroup) -> Option<Ordering>
[src]
fn lt(&self, other: &GmpClassGroup) -> bool
[src]
fn le(&self, other: &GmpClassGroup) -> bool
[src]
fn gt(&self, other: &GmpClassGroup) -> bool
[src]
fn ge(&self, other: &GmpClassGroup) -> bool
[src]
impl PartialEq<GmpClassGroup> for GmpClassGroup
[src]
fn eq(&self, other: &GmpClassGroup) -> bool
[src]
fn ne(&self, other: &GmpClassGroup) -> bool
[src]
impl Default for GmpClassGroup
[src]
impl Clone for GmpClassGroup
[src]
fn clone(&self) -> 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 cmp(&self, other: &GmpClassGroup) -> Ordering
[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<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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.
fn mul(self, rhs: B) -> Self
[src]
impl<'a, B: Borrow<GmpClassGroup>> Mul<B> for &'a GmpClassGroup
[src]
type Output = GmpClassGroup
The resulting type after applying the *
operator.
fn mul(self, rhs: B) -> Self::Output
[src]
impl<B: Borrow<GmpClassGroup>> MulAssign<B> for GmpClassGroup
[src]
fn mul_assign(&mut self, rhs: B)
[src]
Auto Trait Implementations
impl Send for GmpClassGroup
impl Sync for GmpClassGroup
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same for T
type Output = T
Should always be Self