#[repr(C)]pub struct U512(pub [u128; 4]);
Expand description
512-bit, stack allocated biginteger for use in extension field serialization and scalar interpretation.
Tuple Fields§
§0: [u128; 4]
Implementations§
Source§impl U512
impl U512
pub fn from_slice(s: &[u8]) -> Result<U512, Error>
pub fn get_bit(&self, n: usize) -> Option<bool>
Sourcepub fn divrem(&self, modulo: &U256) -> (Option<U256>, U256)
pub fn divrem(&self, modulo: &U256) -> (Option<U256>, U256)
Divides self by modulo, returning remainder and, if possible, a quotient smaller than the modulus.
pub fn interpret(buf: &[u8; 64]) -> U512
Trait Implementations§
Source§impl Ord for U512
impl Ord for U512
Source§impl PartialOrd for U512
impl PartialOrd for U512
impl Copy for U512
impl Eq for U512
impl StructuralPartialEq for U512
Auto Trait Implementations§
impl Freeze for U512
impl RefUnwindSafe for U512
impl Send for U512
impl Sync for U512
impl Unpin for U512
impl UnwindSafe for U512
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