Struct unknown_order::Group

source ·
pub struct Group {
    pub modulus: BigNumber,
}
Expand description

Represents a cyclic group where all operations are reduced by a modulus. Purely a convenience struct to avoid having to call mod{ops}

Fields§

§modulus: BigNumber

The upper limit that all values in the group are to be reduced

Implementations§

source§

impl Group

source

pub fn neg(&self, rhs: &BigNumber) -> BigNumber

Compute -rhs mod self

source

pub fn sum<I>(&self, nums: I) -> BigNumber
where I: AsRef<[BigNumber]>,

Compute the sum of the the bignumbers in the group

source

pub fn product<I>(&self, nums: I) -> BigNumber
where I: AsRef<[BigNumber]>,

Compute the product of the the bignumbers in the group

Trait Implementations§

source§

impl<'a, 'b, 'c> Add<(&'a Bn<64>, &'b Bn<64>)> for &'c Group

§

type Output = Bn<64>

The resulting type after applying the + operator.
source§

fn add(self, pair: (&'a BigNumber, &'b BigNumber)) -> Self::Output

Performs the + operation. Read more
source§

impl<'a, 'b> Add<(&'a Bn<64>, &'b Bn<64>)> for Group

§

type Output = Bn<64>

The resulting type after applying the + operator.
source§

fn add(self, pair: (&'a BigNumber, &'b BigNumber)) -> Self::Output

Performs the + operation. Read more
source§

impl<'a, 'c> Add<(&'a Bn<64>, Bn<64>)> for &'c Group

§

type Output = Bn<64>

The resulting type after applying the + operator.
source§

fn add(self, pair: (&'a BigNumber, BigNumber)) -> Self::Output

Performs the + operation. Read more
source§

impl<'a> Add<(&'a Bn<64>, Bn<64>)> for Group

§

type Output = Bn<64>

The resulting type after applying the + operator.
source§

fn add(self, pair: (&'a BigNumber, BigNumber)) -> Self::Output

Performs the + operation. Read more
source§

impl<'b, 'c> Add<(Bn<64>, &'b Bn<64>)> for &'c Group

§

type Output = Bn<64>

The resulting type after applying the + operator.
source§

fn add(self, pair: (BigNumber, &'b BigNumber)) -> Self::Output

Performs the + operation. Read more
source§

impl<'b> Add<(Bn<64>, &'b Bn<64>)> for Group

§

type Output = Bn<64>

The resulting type after applying the + operator.
source§

fn add(self, pair: (BigNumber, &'b BigNumber)) -> Self::Output

Performs the + operation. Read more
source§

impl<'c> Add<(Bn<64>, Bn<64>)> for &'c Group

§

type Output = Bn<64>

The resulting type after applying the + operator.
source§

fn add(self, pair: (BigNumber, BigNumber)) -> Self::Output

Performs the + operation. Read more
source§

impl Add<(Bn<64>, Bn<64>)> for Group

§

type Output = Bn<64>

The resulting type after applying the + operator.
source§

fn add(self, pair: (BigNumber, BigNumber)) -> Self::Output

Performs the + operation. Read more
source§

impl<'a, 'b, 'c> AddAssign<(&'a mut Bn<64>, &'b Bn<64>)> for &'c Group

source§

fn add_assign(&mut self, pair: (&'a mut BigNumber, &'b BigNumber))

Performs the += operation. Read more
source§

impl<'a, 'b> AddAssign<(&'a mut Bn<64>, &'b Bn<64>)> for Group

source§

fn add_assign(&mut self, pair: (&'a mut BigNumber, &'b BigNumber))

Performs the += operation. Read more
source§

impl<'a, 'c> AddAssign<(&'a mut Bn<64>, Bn<64>)> for &'c Group

source§

fn add_assign(&mut self, pair: (&'a mut BigNumber, BigNumber))

Performs the += operation. Read more
source§

impl<'a> AddAssign<(&'a mut Bn<64>, Bn<64>)> for Group

source§

fn add_assign(&mut self, pair: (&'a mut BigNumber, BigNumber))

Performs the += operation. Read more
source§

impl<'a, 'b, 'c> Div<(&'a Bn<64>, &'b Bn<64>)> for &'c Group

§

type Output = Bn<64>

The resulting type after applying the / operator.
source§

fn div(self, pair: (&'a BigNumber, &'b BigNumber)) -> Self::Output

Performs the / operation. Read more
source§

impl<'a, 'b> Div<(&'a Bn<64>, &'b Bn<64>)> for Group

§

type Output = Bn<64>

The resulting type after applying the / operator.
source§

fn div(self, pair: (&'a BigNumber, &'b BigNumber)) -> Self::Output

Performs the / operation. Read more
source§

impl<'a, 'c> Div<(&'a Bn<64>, Bn<64>)> for &'c Group

§

type Output = Bn<64>

The resulting type after applying the / operator.
source§

fn div(self, pair: (&'a BigNumber, BigNumber)) -> Self::Output

Performs the / operation. Read more
source§

impl<'a> Div<(&'a Bn<64>, Bn<64>)> for Group

§

type Output = Bn<64>

The resulting type after applying the / operator.
source§

fn div(self, pair: (&'a BigNumber, BigNumber)) -> Self::Output

Performs the / operation. Read more
source§

impl<'b, 'c> Div<(Bn<64>, &'b Bn<64>)> for &'c Group

§

type Output = Bn<64>

The resulting type after applying the / operator.
source§

fn div(self, pair: (BigNumber, &'b BigNumber)) -> Self::Output

Performs the / operation. Read more
source§

impl<'b> Div<(Bn<64>, &'b Bn<64>)> for Group

§

type Output = Bn<64>

The resulting type after applying the / operator.
source§

fn div(self, pair: (BigNumber, &'b BigNumber)) -> Self::Output

Performs the / operation. Read more
source§

impl<'c> Div<(Bn<64>, Bn<64>)> for &'c Group

§

type Output = Bn<64>

The resulting type after applying the / operator.
source§

fn div(self, pair: (BigNumber, BigNumber)) -> Self::Output

Performs the / operation. Read more
source§

impl Div<(Bn<64>, Bn<64>)> for Group

§

type Output = Bn<64>

The resulting type after applying the / operator.
source§

fn div(self, pair: (BigNumber, BigNumber)) -> Self::Output

Performs the / operation. Read more
source§

impl<'a, 'b, 'c> DivAssign<(&'a mut Bn<64>, &'b Bn<64>)> for &'c Group

source§

fn div_assign(&mut self, pair: (&'a mut BigNumber, &'b BigNumber))

Performs the /= operation. Read more
source§

impl<'a, 'b> DivAssign<(&'a mut Bn<64>, &'b Bn<64>)> for Group

source§

fn div_assign(&mut self, pair: (&'a mut BigNumber, &'b BigNumber))

Performs the /= operation. Read more
source§

impl<'a, 'c> DivAssign<(&'a mut Bn<64>, Bn<64>)> for &'c Group

source§

fn div_assign(&mut self, pair: (&'a mut BigNumber, BigNumber))

Performs the /= operation. Read more
source§

impl<'a> DivAssign<(&'a mut Bn<64>, Bn<64>)> for Group

source§

fn div_assign(&mut self, pair: (&'a mut BigNumber, BigNumber))

Performs the /= operation. Read more
source§

impl<'a, 'b, 'c> Mul<(&'a Bn<64>, &'b Bn<64>)> for &'c Group

§

type Output = Bn<64>

The resulting type after applying the * operator.
source§

fn mul(self, pair: (&'a BigNumber, &'b BigNumber)) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, 'b> Mul<(&'a Bn<64>, &'b Bn<64>)> for Group

§

type Output = Bn<64>

The resulting type after applying the * operator.
source§

fn mul(self, pair: (&'a BigNumber, &'b BigNumber)) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, 'c> Mul<(&'a Bn<64>, Bn<64>)> for &'c Group

§

type Output = Bn<64>

The resulting type after applying the * operator.
source§

fn mul(self, pair: (&'a BigNumber, BigNumber)) -> Self::Output

Performs the * operation. Read more
source§

impl<'a> Mul<(&'a Bn<64>, Bn<64>)> for Group

§

type Output = Bn<64>

The resulting type after applying the * operator.
source§

fn mul(self, pair: (&'a BigNumber, BigNumber)) -> Self::Output

Performs the * operation. Read more
source§

impl<'b, 'c> Mul<(Bn<64>, &'b Bn<64>)> for &'c Group

§

type Output = Bn<64>

The resulting type after applying the * operator.
source§

fn mul(self, pair: (BigNumber, &'b BigNumber)) -> Self::Output

Performs the * operation. Read more
source§

impl<'b> Mul<(Bn<64>, &'b Bn<64>)> for Group

§

type Output = Bn<64>

The resulting type after applying the * operator.
source§

fn mul(self, pair: (BigNumber, &'b BigNumber)) -> Self::Output

Performs the * operation. Read more
source§

impl<'c> Mul<(Bn<64>, Bn<64>)> for &'c Group

§

type Output = Bn<64>

The resulting type after applying the * operator.
source§

fn mul(self, pair: (BigNumber, BigNumber)) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<(Bn<64>, Bn<64>)> for Group

§

type Output = Bn<64>

The resulting type after applying the * operator.
source§

fn mul(self, pair: (BigNumber, BigNumber)) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, 'b, 'c> MulAssign<(&'a mut Bn<64>, &'b Bn<64>)> for &'c Group

source§

fn mul_assign(&mut self, pair: (&'a mut BigNumber, &'b BigNumber))

Performs the *= operation. Read more
source§

impl<'a, 'b> MulAssign<(&'a mut Bn<64>, &'b Bn<64>)> for Group

source§

fn mul_assign(&mut self, pair: (&'a mut BigNumber, &'b BigNumber))

Performs the *= operation. Read more
source§

impl<'a, 'c> MulAssign<(&'a mut Bn<64>, Bn<64>)> for &'c Group

source§

fn mul_assign(&mut self, pair: (&'a mut BigNumber, BigNumber))

Performs the *= operation. Read more
source§

impl<'a> MulAssign<(&'a mut Bn<64>, Bn<64>)> for Group

source§

fn mul_assign(&mut self, pair: (&'a mut BigNumber, BigNumber))

Performs the *= operation. Read more
source§

impl<'a, 'b, 'c> Sub<(&'a Bn<64>, &'b Bn<64>)> for &'c Group

§

type Output = Bn<64>

The resulting type after applying the - operator.
source§

fn sub(self, pair: (&'a BigNumber, &'b BigNumber)) -> Self::Output

Performs the - operation. Read more
source§

impl<'a, 'b> Sub<(&'a Bn<64>, &'b Bn<64>)> for Group

§

type Output = Bn<64>

The resulting type after applying the - operator.
source§

fn sub(self, pair: (&'a BigNumber, &'b BigNumber)) -> Self::Output

Performs the - operation. Read more
source§

impl<'a, 'c> Sub<(&'a Bn<64>, Bn<64>)> for &'c Group

§

type Output = Bn<64>

The resulting type after applying the - operator.
source§

fn sub(self, pair: (&'a BigNumber, BigNumber)) -> Self::Output

Performs the - operation. Read more
source§

impl<'a> Sub<(&'a Bn<64>, Bn<64>)> for Group

§

type Output = Bn<64>

The resulting type after applying the - operator.
source§

fn sub(self, pair: (&'a BigNumber, BigNumber)) -> Self::Output

Performs the - operation. Read more
source§

impl<'b, 'c> Sub<(Bn<64>, &'b Bn<64>)> for &'c Group

§

type Output = Bn<64>

The resulting type after applying the - operator.
source§

fn sub(self, pair: (BigNumber, &'b BigNumber)) -> Self::Output

Performs the - operation. Read more
source§

impl<'b> Sub<(Bn<64>, &'b Bn<64>)> for Group

§

type Output = Bn<64>

The resulting type after applying the - operator.
source§

fn sub(self, pair: (BigNumber, &'b BigNumber)) -> Self::Output

Performs the - operation. Read more
source§

impl<'c> Sub<(Bn<64>, Bn<64>)> for &'c Group

§

type Output = Bn<64>

The resulting type after applying the - operator.
source§

fn sub(self, pair: (BigNumber, BigNumber)) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<(Bn<64>, Bn<64>)> for Group

§

type Output = Bn<64>

The resulting type after applying the - operator.
source§

fn sub(self, pair: (BigNumber, BigNumber)) -> Self::Output

Performs the - operation. Read more
source§

impl<'a, 'b, 'c> SubAssign<(&'a mut Bn<64>, &'b Bn<64>)> for &'c Group

source§

fn sub_assign(&mut self, pair: (&'a mut BigNumber, &'b BigNumber))

Performs the -= operation. Read more
source§

impl<'a, 'b> SubAssign<(&'a mut Bn<64>, &'b Bn<64>)> for Group

source§

fn sub_assign(&mut self, pair: (&'a mut BigNumber, &'b BigNumber))

Performs the -= operation. Read more
source§

impl<'a, 'c> SubAssign<(&'a mut Bn<64>, Bn<64>)> for &'c Group

source§

fn sub_assign(&mut self, pair: (&'a mut BigNumber, BigNumber))

Performs the -= operation. Read more
source§

impl<'a> SubAssign<(&'a mut Bn<64>, Bn<64>)> for Group

source§

fn sub_assign(&mut self, pair: (&'a mut BigNumber, BigNumber))

Performs the -= operation. Read more

Auto Trait Implementations§

§

impl Freeze for Group

§

impl RefUnwindSafe for Group

§

impl Send for Group

§

impl Sync for Group

§

impl Unpin for Group

§

impl UnwindSafe for Group

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.