pub enum Primality {
Prime(PrimalityCertificate),
Composite,
Unproven,
}Expand description
The outcome of a primality proof attempt (see prove_prime).
Variants§
Prime(PrimalityCertificate)
n is prime, witnessed by a checkable PrimalityCertificate.
Composite
n is certainly composite (a factor, a Fermat witness, or a
deterministic Baillie–PSW rejection was found).
Unproven
n is a probable prime, but n∓1 could not be factored far enough to
build a certificate. A general-purpose proof (ECPP / APR-CL) would be
needed; those are out of scope here.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Primality
impl RefUnwindSafe for Primality
impl Send for Primality
impl Sync for Primality
impl Unpin for Primality
impl UnsafeUnpin 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