pub struct FieldElem {
pub value: [u32; 8],
}
Fields§
§value: [u32; 8]
Implementations§
source§impl FieldElem
impl FieldElem
pub fn new(x: [u32; 8]) -> FieldElem
pub fn from_slice(x: &[u32]) -> FieldElem
pub fn zero() -> FieldElem
pub fn is_zero(&self) -> bool
pub fn div2(&self, carry: u32) -> FieldElem
pub fn is_even(&self) -> bool
pub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn from_bytes(x: &[u8]) -> Result<FieldElem, Sm2Error>
pub fn to_biguint(&self) -> BigUint
pub fn from_biguint(bi: &BigUint) -> Result<FieldElem, Sm2Error>
pub fn from_num(x: u64) -> FieldElem
pub fn to_str(&self, radix: u32) -> String
pub fn get_value(&self, i: usize) -> u32
Trait Implementations§
source§impl Ord for FieldElem
impl Ord for FieldElem
source§impl PartialEq for FieldElem
impl PartialEq for FieldElem
source§impl PartialOrd for FieldElem
impl PartialOrd for FieldElem
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for FieldElem
impl Eq for FieldElem
impl StructuralEq for FieldElem
impl StructuralPartialEq for FieldElem
Auto Trait Implementations§
impl RefUnwindSafe for FieldElem
impl Send for FieldElem
impl Sync for FieldElem
impl Unpin for FieldElem
impl UnwindSafe for FieldElem
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