[][src]Struct red_primality::Prime

pub struct Prime { /* fields omitted */ }

Wrapper type certifying that a u64 is prime.

Methods

impl Prime[src]

pub fn new(n: u64) -> Option<Prime>[src]

Produces a certified prime, if appropriate.

pub unsafe fn new_unsafe(n: u64) -> Prime[src]

Forges a primality certificate. Use with caution.

pub fn get(&self) -> u64[src]

Get the contained prime.

Trait Implementations

impl Clone for Prime[src]

impl Copy for Prime[src]

impl Debug for Prime[src]

impl Deref for Prime[src]

type Target = u64

The resulting type after dereferencing.

impl Display for Prime[src]

impl Eq for Prime[src]

impl Hash for Prime[src]

impl Ord for Prime[src]

impl PartialEq<Prime> for Prime[src]

impl PartialOrd<Prime> for Prime[src]

impl StructuralEq for Prime[src]

impl StructuralPartialEq for Prime[src]

Auto Trait Implementations

impl RefUnwindSafe for Prime

impl Send for Prime

impl Sync for Prime

impl Unpin for Prime

impl UnwindSafe for Prime

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.