pub enum PrimeGenRes<T> {
InvalidInput(usize),
All(Vec<T>),
Max(T),
TimeframeExhaustion,
}Expand description
Prime number generation result enumeration.
Variants§
InvalidInput(usize)
Invalid input. Either due:
- Limit invalidation.
- Order invalidation.
- Invalidation regarding target number type size.
All(Vec<T>)
All prime numbers generated.
Max(T)
Only maximal prime number generated.
TimeframeExhaustion
Time limit exhaustion.
Implementations§
Source§impl<T> PrimeGenRes<T>
impl<T> PrimeGenRes<T>
Sourcepub const fn accomplished(&self) -> bool
pub const fn accomplished(&self) -> bool
Returns true if and only if denoting accomplished generation.
Sourcepub fn uproot_all(self) -> Vec<T>
pub fn uproot_all(self) -> Vec<T>
Returns Vec<T> of PrimeGenRes::All(Vec<T>) or panics
if not that variant.
Sourcepub fn uproot_max(self) -> T
pub fn uproot_max(self) -> T
Returns T of PrimeGenRes::Max(T) or panics
if not that variant.
Trait Implementations§
Source§impl<T: Clone> Clone for PrimeGenRes<T>
impl<T: Clone> Clone for PrimeGenRes<T>
Source§fn clone(&self) -> PrimeGenRes<T>
fn clone(&self) -> PrimeGenRes<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for PrimeGenRes<T>
impl<T: Debug> Debug for PrimeGenRes<T>
Source§impl<T: PartialEq> PartialEq for PrimeGenRes<T>
impl<T: PartialEq> PartialEq for PrimeGenRes<T>
impl<T> StructuralPartialEq for PrimeGenRes<T>
Auto Trait Implementations§
impl<T> Freeze for PrimeGenRes<T>where
T: Freeze,
impl<T> RefUnwindSafe for PrimeGenRes<T>where
T: RefUnwindSafe,
impl<T> Send for PrimeGenRes<T>where
T: Send,
impl<T> Sync for PrimeGenRes<T>where
T: Sync,
impl<T> Unpin for PrimeGenRes<T>where
T: Unpin,
impl<T> UnwindSafe for PrimeGenRes<T>where
T: UnwindSafe,
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