Struct substrate_bn::arith::U512 [−][src]
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]
fn cmp(&self, other: &U512) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]
pub fn max(self, other: Self) -> Self#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]
pub fn min(self, other: Self) -> Self#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
#[must_use]
pub fn clamp(self, min: Self, max: Self) -> Selfimpl PartialEq<U512> for U512
[src]
impl PartialOrd<U512> for U512
[src]
fn partial_cmp(&self, other: &U512) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn lt(&self, other: &Rhs) -> bool#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn le(&self, other: &Rhs) -> bool#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn gt(&self, other: &Rhs) -> bool#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn ge(&self, other: &Rhs) -> boolimpl 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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,