[][src]Struct gf::GF

pub struct GF<T>(pub T);

The Golias Field Type.

use gf::{GF, GF256};

let val = GF(4);

let typed_val1 = GF(5u8);
let typed_val2 = GF256::new(5);
assert_eq!(typed_val1, typed_val2)

Supports all basic Mathemtaical Functions

Methods

impl<T> GF<T>[src]

pub fn new(inner: T) -> Self[src]

Trait Implementations

impl Field for GF<u8>[src]

fn zero() -> Self[src]

fn is_zero(&self) -> bool[src]

fn one() -> Self[src]

fn square(&mut self)[src]

impl<T: Display> Display for GF<T>[src]

impl<T: Debug> Debug for GF<T>[src]

impl<T> Div<GF<T>> for GF<T> where
    Self: DivAssign
[src]

type Output = Self

The resulting type after applying the / operator.

impl<T: PartialEq> PartialEq<GF<T>> for GF<T>[src]

impl<T: Eq> Eq for GF<T>[src]

impl<T> Add<GF<T>> for GF<T> where
    Self: AddAssign
[src]

type Output = Self

The resulting type after applying the + operator.

impl<T> Sub<GF<T>> for GF<T> where
    Self: SubAssign
[src]

type Output = Self

The resulting type after applying the - operator.

impl<T> Mul<GF<T>> for GF<T> where
    Self: MulAssign
[src]

type Output = Self

The resulting type after applying the * operator.

impl<T> Neg for GF<T>[src]

type Output = Self

The resulting type after applying the - operator.

impl<T: BitXor<Output = T> + Copy> AddAssign<GF<T>> for GF<T>[src]

impl<T: BitXor<Output = T> + Copy> SubAssign<GF<T>> for GF<T>[src]

impl MulAssign<GF<u8>> for GF<u8>[src]

impl DivAssign<GF<u8>> for GF<u8>[src]

impl<T> Sum<GF<T>> for GF<T> where
    Self: Field
[src]

impl<T> Product<GF<T>> for GF<T> where
    Self: Field
[src]

impl<T: Copy> Copy for GF<T>[src]

impl Into<u8> for GF<u8>[src]

impl Into<u16> for GF<u16>[src]

impl Into<u32> for GF<u32>[src]

impl Into<u64> for GF<u64>[src]

impl Into<u128> for GF<u128>[src]

impl Into<i8> for GF<i8>[src]

impl Into<i16> for GF<i16>[src]

impl Into<i32> for GF<i32>[src]

impl Into<i64> for GF<i64>[src]

impl Into<i128> for GF<i128>[src]

impl From<u8> for GF<u8>[src]

impl From<u16> for GF<u16>[src]

impl From<u32> for GF<u32>[src]

impl From<u64> for GF<u64>[src]

impl From<u128> for GF<u128>[src]

impl From<i8> for GF<i8>[src]

impl From<i16> for GF<i16>[src]

impl From<i32> for GF<i32>[src]

impl From<i64> for GF<i64>[src]

impl From<i128> for GF<i128>[src]

impl<T: Clone> Clone for GF<T>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T> Unpin for GF<T> where
    T: Unpin

impl<T> Sync for GF<T> where
    T: Sync

impl<T> Send for GF<T> where
    T: Send

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]