Struct substrate_bn::arith::U512[][src]

#[repr(C)]
pub struct U512(pub [u128; 4]);

512-bit, stack allocated biginteger for use in extension field serialization and scalar interpretation.

Implementations

impl U512[src]

pub fn new(c1: &U256, c0: &U256, modulo: &U256) -> U512[src]

Multiplies c1 by modulo, adds c0.

pub fn from_slice(s: &[u8]) -> Result<U512, Error>[src]

pub fn random<R: Rng>(rng: &mut R) -> U512[src]

Get a random U512

pub fn get_bit(&self, n: usize) -> Option<bool>[src]

pub fn divrem(&self, modulo: &U256) -> (Option<U256>, U256)[src]

Divides self by modulo, returning remainder and, if possible, a quotient smaller than the modulus.

pub fn interpret(buf: &[u8; 64]) -> U512[src]

Trait Implementations

impl Clone for U512[src]

impl Copy for U512[src]

impl Debug for U512[src]

impl Eq for U512[src]

impl From<[u64; 8]> for U512[src]

impl Ord for U512[src]

impl PartialEq<U512> for U512[src]

impl PartialOrd<U512> for U512[src]

impl StructuralEq for U512[src]

impl StructuralPartialEq for U512[src]

Auto Trait Implementations

impl RefUnwindSafe for U512

impl Send for U512

impl Sync for U512

impl Unpin for U512

impl UnwindSafe for U512

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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, 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<V, T> VZip<V> for T where
    V: MultiLane<T>,