[][src]Struct primes::TrialDivision

pub struct TrialDivision { /* fields omitted */ }

A prime generator, using the Trial Division method.

Create with let mut pset = TrialDivision::new(), and then use pset.iter() to iterate over all primes.


impl TrialDivision[src]

pub fn new() -> TrialDivision[src]

A new prime generator, primed with 2 and 3

Trait Implementations

impl Clone for TrialDivision[src]

impl Default for TrialDivision[src]

impl Index<usize> for TrialDivision[src]

type Output = u64

The returned type after indexing.

impl PrimeSetBasics for TrialDivision[src]

fn expand(&mut self)[src]

Finds one more prime, and adds it to the list

fn list(&self) -> &[u64][src]

Return all primes found so far as a slice

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<P> PrimeSet for P where
    P: PrimeSetBasics

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.