#[repr(transparent)]
pub struct GF<T>(pub T);
Expand description
use gf::GF;
let val = GF(4);
let typed_val1 = GF(5u8);
let typed_val2 = GF::<u8>(5);
assert_eq!(typed_val1, typed_val2)
Supports all basic Mathemtaical Functions
impl Add<&'_ GF<u128>> for GF<u128>
The resulting type after applying the +
operator.
impl Add<&'_ GF<u128>> for &GF<u128>
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
impl Add<&'_ GF<usize>> for GF<usize>
The resulting type after applying the +
operator.
impl Add<&'_ GF<usize>> for &GF<usize>
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
impl<'a> Add<GF<u128>> for &'a GF<u128>
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
impl<'a> Add<GF<u32>> for &'a GF<u32>
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
impl<'a> Add<GF<u64>> for &'a GF<u64>
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
impl<'a> Add<GF<u8>> for &'a GF<u8>
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
impl<'a> Add<GF<usize>> for &'a GF<usize>
The resulting type after applying the +
operator.
Formats the value using the given formatter.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the &
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the |
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
The resulting type after applying the ^
operator.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Formats the value using the given formatter. Read more
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
impl<'a> Div<GF<u8>> for &'a GF<u8>
The resulting type after applying the /
operator.
impl From<GF<usize>> for usize
impl From<usize> for GF<usize>
The result after applying the operator.
Returns the multiplicative inverse of self
. Read more
The result after applying the operator.
Returns the multiplicative inverse of self
. Read more
Formats the value using the given formatter.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
impl<'a> Mul<GF<u8>> for &'a GF<u8>
The resulting type after applying the *
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the !
operator.
The resulting type after applying the !
operator.
The resulting type after applying the !
operator.
The resulting type after applying the !
operator.
The resulting type after applying the !
operator.
The resulting type after applying the !
operator.
The resulting type after applying the !
operator.
The resulting type after applying the !
operator.
The resulting type after applying the !
operator.
The resulting type after applying the !
operator.
Formats the value using the given formatter.
Returns the multiplicative identity element of Self
, 1
. Read more
Sets self
to the multiplicative identity element of Self
, 1
.
Returns true
if self
is equal to the multiplicative identity. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
impl Pow<&'_ u8> for GF<u8>
The result after applying the operator.
impl Pow<&'_ u8> for &GF<u8>
The result after applying the operator.
impl Pow<&'_ usize> for GF<u8>
The result after applying the operator.
impl Pow<&'_ usize> for &GF<u8>
The result after applying the operator.
The result after applying the operator.
impl<'a> Pow<u8> for &'a GF<u8>
The result after applying the operator.
impl Pow<usize> for GF<u8>
The result after applying the operator.
impl<'a> Pow<usize> for &'a GF<u8>
The result after applying the operator.
Method which takes an iterator and generates Self
from the elements by
multiplying the items. Read more
Method which takes an iterator and generates Self
from the elements by
multiplying the items. Read more
impl Sub<&'_ GF<u128>> for GF<u128>
The resulting type after applying the -
operator.
impl Sub<&'_ GF<u128>> for &GF<u128>
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
impl Sub<&'_ GF<usize>> for GF<usize>
The resulting type after applying the -
operator.
impl Sub<&'_ GF<usize>> for &GF<usize>
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
impl<'a> Sub<GF<u128>> for &'a GF<u128>
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
impl<'a> Sub<GF<u32>> for &'a GF<u32>
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
impl<'a> Sub<GF<u64>> for &'a GF<u64>
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
impl<'a> Sub<GF<u8>> for &'a GF<u8>
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
impl<'a> Sub<GF<usize>> for &'a GF<usize>
The resulting type after applying the -
operator.
impl<'a> Sum<&'a GF<u128>> for GF<u128>
Method which takes an iterator and generates Self
from the elements by
“summing up” the items. Read more
impl<'a> Sum<&'a GF<u32>> for GF<u32>
Method which takes an iterator and generates Self
from the elements by
“summing up” the items. Read more
impl<'a> Sum<&'a GF<u64>> for GF<u64>
Method which takes an iterator and generates Self
from the elements by
“summing up” the items. Read more
impl<'a> Sum<&'a GF<u8>> for GF<u8>
Method which takes an iterator and generates Self
from the elements by
“summing up” the items. Read more
impl<'a> Sum<&'a GF<usize>> for GF<usize>
Method which takes an iterator and generates Self
from the elements by
“summing up” the items. Read more
Method which takes an iterator and generates Self
from the elements by
“summing up” the items. Read more
Method which takes an iterator and generates Self
from the elements by
“summing up” the items. Read more
Method which takes an iterator and generates Self
from the elements by
“summing up” the items. Read more
Method which takes an iterator and generates Self
from the elements by
“summing up” the items. Read more
Method which takes an iterator and generates Self
from the elements by
“summing up” the items. Read more
Formats the value using the given formatter.
Returns the additive identity element of Self
, 0
. Read more
Returns true
if self
is equal to the additive identity.
Sets self
to the additive identity element of Self
, 0
.
Returns the additive identity element of Self
, 0
. Read more
Returns true
if self
is equal to the additive identity.
Sets self
to the additive identity element of Self
, 0
.
Returns the additive identity element of Self
, 0
. Read more
Returns true
if self
is equal to the additive identity.
Sets self
to the additive identity element of Self
, 0
.
Returns the additive identity element of Self
, 0
. Read more
Returns true
if self
is equal to the additive identity.
Sets self
to the additive identity element of Self
, 0
.
Returns the additive identity element of Self
, 0
. Read more
Returns true
if self
is equal to the additive identity.
Sets self
to the additive identity element of Self
, 0
.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.