Trait is_prime_for_primitive_int::IsPrime[][src]

pub trait IsPrime {
    fn is_prime(&self) -> bool;
}

primality test

use is_prime_for_primitive_int::IsPrime;
assert_eq!(2.is_prime(), true);
assert_eq!(57.is_prime(), false);
assert_eq!(91.is_prime(), false);
assert_eq!(97.is_prime(), true);

Required methods

fn is_prime(&self) -> bool[src]

Loading content...

Implementors

impl IsPrime for i8[src]

impl IsPrime for i16[src]

impl IsPrime for i32[src]

impl IsPrime for i64[src]

impl IsPrime for u8[src]

impl IsPrime for u16[src]

impl IsPrime for u32[src]

impl IsPrime for u64[src]

Loading content...