[][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.

Methods

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
[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<P> PrimeSet for P where
    P: PrimeSetBasics
[src]

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

type Owned = T

The resulting type after obtaining ownership.

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.