Trait BigIntExt

Source
pub trait BigIntExt {
    // Required methods
    fn bitsize(&self, signed: bool) -> u16;
    fn has_correct_sign(&self, signed: bool) -> bool;
}
Expand description

Extension trait for BigInt or BigUint.

Required Methods§

Source

fn bitsize(&self, signed: bool) -> u16

Determines the fewest bits necessary to serialize self as an optionally signed integer.

Source

fn has_correct_sign(&self, signed: bool) -> bool

Returns true if this number sign aligns with the signed.

Implementations on Foreign Types§

Source§

impl BigIntExt for BigInt

Source§

fn bitsize(&self, signed: bool) -> u16

Source§

fn has_correct_sign(&self, signed: bool) -> bool

Source§

impl BigIntExt for BigUint

Source§

fn bitsize(&self, signed: bool) -> u16

Source§

fn has_correct_sign(&self, _: bool) -> bool

Implementors§