Struct Fe

Source
pub struct Fe(/* private fields */);
Expand description

An element of GF32

Implementations§

Source§

impl Fe

Source

pub const Q: Fe

Source

pub const P: Fe

Source

pub const Z: Fe

Source

pub const R: Fe

Source

pub const Y: Fe

Source

pub const _9: Fe

Source

pub const X: Fe

Source

pub const _8: Fe

Source

pub const G: Fe

Source

pub const F: Fe

Source

pub const _2: Fe

Source

pub const T: Fe

Source

pub const V: Fe

Source

pub const D: Fe

Source

pub const W: Fe

Source

pub const _0: Fe

Source

pub const S: Fe

Source

pub const _3: Fe

Source

pub const J: Fe

Source

pub const N: Fe

Source

pub const _5: Fe

Source

pub const _4: Fe

Source

pub const K: Fe

Source

pub const H: Fe

Source

pub const C: Fe

Source

pub const E: Fe

Source

pub const _6: Fe

Source

pub const M: Fe

Source

pub const U: Fe

Source

pub const A: Fe

Source

pub const _7: Fe

Source

pub const L: Fe

Source

pub fn iter_alpha() -> impl Iterator<Item = Fe>

Iterator over all field elements, in alphabetical order

Source

pub fn from_u8(byte: u8) -> Result<Fe, Error>

Creates a field element from an integer type

Source

pub fn from_int<I>(i: I) -> Result<Fe, Error>
where I: TryInto<u8, Error = TryFromIntError>,

Creates a field element from an integer type

Source

pub fn from_char(c: char) -> Result<Fe, Error>

Creates a field element from a single bech32 character

Source

pub fn to_char(self) -> char

Converts the field element to a lowercase bech32 character

Source

pub fn to_u8(self) -> u8

Converts the field element to a 5-bit u8, with bits representing the coefficients of the polynomial representation.

Trait Implementations§

Source§

impl Add for Fe

Source§

type Output = Fe

The resulting type after applying the + operator.
Source§

fn add(self, other: Fe) -> Fe

Performs the + operation. Read more
Source§

impl AddAssign for Fe

Source§

fn add_assign(&mut self, other: Fe)

Performs the += operation. Read more
Source§

impl Clone for Fe

Source§

fn clone(&self) -> Fe

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Fe

Source§

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

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

impl Display for Fe

Source§

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

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

impl Div for Fe

Source§

type Output = Fe

The resulting type after applying the / operator.
Source§

fn div(self, other: Fe) -> Fe

Performs the / operation. Read more
Source§

impl DivAssign for Fe

Source§

fn div_assign(&mut self, other: Fe)

Performs the /= operation. Read more
Source§

impl FromStr for Fe

Source§

type Err = Error

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Fe, Error>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for Fe

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 Mul for Fe

Source§

type Output = Fe

The resulting type after applying the * operator.
Source§

fn mul(self, other: Fe) -> Fe

Performs the * operation. Read more
Source§

impl MulAssign for Fe

Source§

fn mul_assign(&mut self, other: Fe)

Performs the *= operation. Read more
Source§

impl PartialEq for Fe

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Sub for Fe

Source§

type Output = Fe

The resulting type after applying the - operator.
Source§

fn sub(self, other: Fe) -> Fe

Performs the - operation. Read more
Source§

impl SubAssign for Fe

Source§

fn sub_assign(&mut self, other: Fe)

Performs the -= operation. Read more
Source§

impl Copy for Fe

Source§

impl Eq for Fe

Source§

impl StructuralPartialEq for Fe

Auto Trait Implementations§

§

impl Freeze for Fe

§

impl RefUnwindSafe for Fe

§

impl Send for Fe

§

impl Sync for Fe

§

impl Unpin for Fe

§

impl UnwindSafe for Fe

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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 T
where T: Clone,

Source§

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 T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.