pub struct Fe32(/* private fields */);Expand description
An element in GF(32), the finite field containing elements [0,31] inclusive.
Implementations§
Source§impl Fe32
impl Fe32
Sourcepub fn iter_alpha() -> impl Iterator<Item = Fe32>
pub fn iter_alpha() -> impl Iterator<Item = Fe32>
Iterator over all field elements, in alphabetical order.
Sourcepub fn from_char(c: char) -> Result<Fe32, FromCharError>
pub fn from_char(c: char) -> Result<Fe32, FromCharError>
Creates a field element from a single bech32 character.
§Errors
If the input char is not part of the bech32 alphabet.
Sourcepub fn from_char_unchecked(c: u8) -> Fe32
pub fn from_char_unchecked(c: u8) -> Fe32
Creates a field element from a single bech32 character.
§Panics
If the input character is not part of the bech32 alphabet.
Trait Implementations§
Source§impl AddAssign for Fe32
impl AddAssign for Fe32
Source§fn add_assign(&mut self, other: Fe32)
fn add_assign(&mut self, other: Fe32)
Performs the
+= operation. Read moreSource§impl DivAssign for Fe32
impl DivAssign for Fe32
Source§fn div_assign(&mut self, other: Fe32)
fn div_assign(&mut self, other: Fe32)
Performs the
/= operation. Read moreSource§impl From<WitnessVersion> for Fe32
impl From<WitnessVersion> for Fe32
Source§fn from(version: WitnessVersion) -> Fe32
fn from(version: WitnessVersion) -> Fe32
Converts to this type from the input type.
Source§impl MulAssign for Fe32
impl MulAssign for Fe32
Source§fn mul_assign(&mut self, other: Fe32)
fn mul_assign(&mut self, other: Fe32)
Performs the
*= operation. Read moreSource§impl SubAssign for Fe32
impl SubAssign for Fe32
Source§fn sub_assign(&mut self, other: Fe32)
fn sub_assign(&mut self, other: Fe32)
Performs the
-= operation. Read moreSource§impl TryFrom<Fe32> for WitnessVersion
impl TryFrom<Fe32> for WitnessVersion
Source§type Error = TryFromError
type Error = TryFromError
The type returned in the event of a conversion error.
Source§fn try_from(
value: Fe32,
) -> Result<WitnessVersion, <WitnessVersion as TryFrom<Fe32>>::Error>
fn try_from( value: Fe32, ) -> Result<WitnessVersion, <WitnessVersion as TryFrom<Fe32>>::Error>
Performs the conversion.
impl Copy for Fe32
impl Eq for Fe32
impl StructuralPartialEq for Fe32
Auto Trait Implementations§
impl Freeze for Fe32
impl RefUnwindSafe for Fe32
impl Send for Fe32
impl Sync for Fe32
impl Unpin for Fe32
impl UnwindSafe for Fe32
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more