[][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: PartialEq> PartialEq<GF<T>> for GF<T>[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

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

impl<T: Copy> Copy for GF<T>[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> 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]

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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> 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]