Struct m61_modulus::M61

source ·
#[repr(transparent)]
pub struct M61(_);
Expand description

A 64-bit integer in which arithmetic is performed modulp 2^61 - 1.

Implementations§

source§

impl M61

source

pub const fn get(self) -> u64

Returns the contained value.

Trait Implementations§

source§

impl<'a> Add<&'a M61> for M61

§

type Output = M61

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Self) -> Self::Output

Performs the + operation. Read more
source§

impl Add<M61> for M61

§

type Output = M61

The resulting type after applying the + operator.
source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
source§

impl<'a> AddAssign<&'a M61> for M61

source§

fn add_assign(&mut self, rhs: &Self)

Performs the += operation. Read more
source§

impl AddAssign<M61> for M61

source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
source§

impl Binary for M61

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Clone for M61

source§

fn clone(&self) -> M61

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for M61

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for M61

source§

fn default() -> M61

Returns the “default value” for a type. Read more
source§

impl Display for M61

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> Div<&'a M61> for M61

§

type Output = M61

The resulting type after applying the / operator.
source§

fn div(self, rhs: &Self) -> Self::Output

Performs the / operation. Read more
source§

impl Div<M61> for M61

§

type Output = M61

The resulting type after applying the / operator.
source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
source§

impl<'a> DivAssign<&'a M61> for M61

source§

fn div_assign(&mut self, rhs: &Self)

Performs the /= operation. Read more
source§

impl DivAssign<M61> for M61

source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
source§

impl From<i128> for M61

source§

fn from(value: i128) -> Self

Converts to this type from the input type.
source§

impl From<i16> for M61

source§

fn from(value: i16) -> Self

Converts to this type from the input type.
source§

impl From<i32> for M61

source§

fn from(value: i32) -> Self

Converts to this type from the input type.
source§

impl From<i64> for M61

source§

fn from(value: i64) -> Self

Converts to this type from the input type.
source§

impl From<i8> for M61

source§

fn from(value: i8) -> Self

Converts to this type from the input type.
source§

impl From<isize> for M61

source§

fn from(value: isize) -> Self

Converts to this type from the input type.
source§

impl From<u128> for M61

source§

fn from(value: u128) -> Self

Converts to this type from the input type.
source§

impl From<u16> for M61

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl From<u32> for M61

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl From<u64> for M61

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl From<u8> for M61

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl From<usize> for M61

source§

fn from(value: usize) -> Self

Converts to this type from the input type.
source§

impl Hash for M61

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

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

Feeds a slice of this type into the given Hasher. Read more
source§

impl LowerExp for M61

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl LowerHex for M61

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl<'a> Mul<&'a M61> for M61

§

type Output = M61

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Self) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<M61> for M61

§

type Output = M61

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
source§

impl<'a> MulAssign<&'a M61> for M61

source§

fn mul_assign(&mut self, rhs: &Self)

Performs the *= operation. Read more
source§

impl MulAssign<M61> for M61

source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
source§

impl Octal for M61

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Ord for M61

source§

fn cmp(&self, other: &M61) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<M61> for M61

source§

fn eq(&self, other: &M61) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<M61> for M61

source§

fn partial_cmp(&self, other: &M61) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<'a> Product<&'a M61> for M61

source§

fn product<I: Iterator<Item = &'a Self>>(iter: I) -> Self

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

impl Product<M61> for M61

source§

fn product<I: Iterator<Item = Self>>(iter: I) -> Self

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

impl<'a> Sub<&'a M61> for M61

§

type Output = M61

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &Self) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<M61> for M61

§

type Output = M61

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
source§

impl<'a> SubAssign<&'a M61> for M61

source§

fn sub_assign(&mut self, rhs: &Self)

Performs the -= operation. Read more
source§

impl SubAssign<M61> for M61

source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
source§

impl<'a> Sum<&'a M61> for M61

source§

fn sum<I: Iterator<Item = &'a Self>>(iter: I) -> Self

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl Sum<M61> for M61

source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl UpperExp for M61

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl UpperHex for M61

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Copy for M61

source§

impl Eq for M61

source§

impl StructuralEq for M61

source§

impl StructuralPartialEq for M61

Auto Trait Implementations§

§

impl RefUnwindSafe for M61

§

impl Send for M61

§

impl Sync for M61

§

impl Unpin for M61

§

impl UnwindSafe for M61

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere 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 Twhere 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.