NumberTests

Trait NumberTests 

Source
pub trait NumberTests {
    // Required methods
    fn is_zero(_: &Self) -> bool;
    fn is_even(_: &Self) -> bool;
    fn is_negative(_: &Self) -> bool;
    fn bits(_: &Self) -> usize;
}
Expand description

Numerical tests for a BigInt

Required Methods§

Source

fn is_zero(_: &Self) -> bool

Is a BigInt equal to zero

Source

fn is_even(_: &Self) -> bool

Is a BigInt even

Source

fn is_negative(_: &Self) -> bool

Is a BitInt negative

Source

fn bits(_: &Self) -> usize

How many bits in a BigInt

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl NumberTests for Mpz

Source§

fn is_zero(me: &Self) -> bool

Source§

fn is_even(me: &Self) -> bool

Source§

fn is_negative(me: &Self) -> bool

Source§

fn bits(me: &Self) -> usize

Implementors§