pub enum Primality {
    Prime,
    Probable,
    Composite,
}Expand description
For primality test we use the classic Rabin-Miller test.
Variants§
Prime
The number has been confirmed, deterministically, to be prime.
Probable
The number is only probably prime. Using Rabin-Miller we can get the probability as low as we want, but we can’t get it to 0 (Prime). For deterministic primality testing, see TODO: wiki link.
Composite
The number has been confirmed to be a composite number (i.e. not Prime).
Trait Implementations§
impl StructuralPartialEq for Primality
Auto Trait Implementations§
impl Freeze for Primality
impl RefUnwindSafe for Primality
impl Send for Primality
impl Sync for Primality
impl Unpin for Primality
impl UnwindSafe for Primality
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more