Skip to main content

BigIntExt

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl BigIntExt for BigInt

Available on crate feature bigint only.
Source§

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

Source§

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

Source§

impl BigIntExt for BigUint

Available on crate feature bigint only.
Source§

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

Source§

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

Implementors§