#[repr(transparent)]pub struct GF<T>(pub T);
Expand description
The Galois Field Type.
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 Mathematical Functions
Tuple Fields§
§0: T
Implementations§
Trait Implementations§
source§impl<T, U> AddAssign<U> for GF<T>where
Self: Copy + Add<U, Output = Self>,
impl<T, U> AddAssign<U> for GF<T>where
Self: Copy + Add<U, Output = Self>,
source§fn add_assign(&mut self, rhs: U)
fn add_assign(&mut self, rhs: U)
Performs the
+=
operation. Read moresource§impl<T, U> DivAssign<U> for GF<T>where
Self: Copy + Div<U, Output = Self>,
impl<T, U> DivAssign<U> for GF<T>where
Self: Copy + Div<U, Output = Self>,
source§fn div_assign(&mut self, rhs: U)
fn div_assign(&mut self, rhs: U)
Performs the
/=
operation. Read moresource§impl<T, U> MulAssign<U> for GF<T>where
Self: Copy + Mul<U, Output = Self>,
impl<T, U> MulAssign<U> for GF<T>where
Self: Copy + Mul<U, Output = Self>,
source§fn mul_assign(&mut self, rhs: U)
fn mul_assign(&mut self, rhs: U)
Performs the
*=
operation. Read moresource§impl<T: PartialEq> PartialEq<GF<T>> for GF<T>
impl<T: PartialEq> PartialEq<GF<T>> for GF<T>
source§impl<T, U> SubAssign<U> for GF<T>where
Self: Copy + Sub<U, Output = Self>,
impl<T, U> SubAssign<U> for GF<T>where
Self: Copy + Sub<U, Output = Self>,
source§fn sub_assign(&mut self, rhs: U)
fn sub_assign(&mut self, rhs: U)
Performs the
-=
operation. Read more