pub struct Prime16(/* private fields */);Expand description
A 16-bit prime number, from the set $\Bbb{P}$,
also known as P16.
Can represent the first 6,542 prime numbers.
Implementations§
Source§impl Prime16
impl Prime16
Sourcepub fn new(value: u16) -> NumeraResult<Self>
pub fn new(value: u16) -> NumeraResult<Self>
Sourcepub const fn new_nth(nth: u16) -> NumeraResult<Self>
pub const fn new_nth(nth: u16) -> NumeraResult<Self>
Sourcepub unsafe fn new_unchecked(value: u16) -> Self
Available on crate feature not(safe) only.
pub unsafe fn new_unchecked(value: u16) -> Self
not(safe) only.Sourcepub fn pi(&self) -> usize
pub fn pi(&self) -> usize
Returns the number of primes upto and including the current one.
§Notation
$\pi(x)$
§Example
use numera::all::{Numbers, Prime16};
assert_eq![1, Prime16::new(2)?.pi()];
assert_eq![54, Prime16::new(251)?.pi()];
assert_eq![55, Prime16::new(257)?.pi()];
assert_eq![6_542, Prime16::new(65_521)?.pi()];§Links
Trait Implementations§
Source§impl Bound for Prime16
impl Bound for Prime16
Source§fn is_lower_bounded(&self) -> bool
fn is_lower_bounded(&self) -> bool
Returns true if the number is lower bounded.
Source§fn is_upper_bounded(&self) -> bool
fn is_upper_bounded(&self) -> bool
Returns true if the number is upper bounded.
Source§fn lower_bound(&self) -> Option<Self>
fn lower_bound(&self) -> Option<Self>
Returns the lower bound, if any.
Source§fn upper_bound(&self) -> Option<Self>
fn upper_bound(&self) -> Option<Self>
Returns the upper bound, if any.
Source§impl ConstLowerBounded for Prime16
impl ConstLowerBounded for Prime16
Source§impl ConstUpperBounded for Prime16
impl ConstUpperBounded for Prime16
Source§impl Count for Prime16
impl Count for Prime16
Source§fn is_countable(&self) -> bool
fn is_countable(&self) -> bool
Returns
true if the number is countable.Source§fn is_uncountable(&self) -> bool
fn is_uncountable(&self) -> bool
Returns
false if the number is countable.Source§impl Countable for Prime16
impl Countable for Prime16
Source§fn next(&self) -> NumeraResult<Self>
fn next(&self) -> NumeraResult<Self>
Returns the next prime.
§Examples
use numera::all::{Countable, Number, Prime16};
assert_eq![Prime16::from_inner_repr(5)?.next()?, Prime16::from_inner_repr(7)?];
assert_eq![Prime16::from_inner_repr(251)?.next()?, Prime16::from_inner_repr(257)?];
assert_eq![Prime16::from_inner_repr(257)?.next()?, Prime16::from_inner_repr(263)?];
assert_eq![Prime16::from_inner_repr(65_519)?.next()?, Prime16::from_inner_repr(65_521)?];
assert![Prime16::from_inner_repr(65_521)?.next().is_err()];Source§fn previous(&self) -> NumeraResult<Self>
fn previous(&self) -> NumeraResult<Self>
Returns the previous prime.
§Examples
use numera::all::{Countable, Number, Prime16};
assert_eq![Prime16::from_inner_repr(7)?.previous()?, Prime16::from_inner_repr(5)?];
assert_eq![Prime16::from_inner_repr(251)?.previous()?, Prime16::from_inner_repr(241)?];
assert_eq![Prime16::from_inner_repr(257)?.previous()?, Prime16::from_inner_repr(251)?];
assert_eq![Prime16::from_inner_repr(65_521)?.previous()?, Prime16::from_inner_repr(65_519)?];
assert![Prime16::from_inner_repr(2)?.previous().is_err()];Source§impl From<&Prime16> for Integer128
impl From<&Prime16> for Integer128
Source§impl From<&Prime16> for IntegerBig
Available on crate feature dashu-int only.
impl From<&Prime16> for IntegerBig
Available on crate feature
dashu-int only.Source§impl From<&Prime16> for NonNegativeInteger128
impl From<&Prime16> for NonNegativeInteger128
Source§impl From<&Prime16> for NonNegativeInteger16
impl From<&Prime16> for NonNegativeInteger16
Source§impl From<&Prime16> for NonNegativeInteger32
impl From<&Prime16> for NonNegativeInteger32
Source§impl From<&Prime16> for NonNegativeInteger64
impl From<&Prime16> for NonNegativeInteger64
Source§impl From<&Prime16> for NonZeroInteger128
impl From<&Prime16> for NonZeroInteger128
Source§impl From<&Prime16> for NonZeroInteger32
impl From<&Prime16> for NonZeroInteger32
Source§impl From<&Prime16> for NonZeroInteger64
impl From<&Prime16> for NonZeroInteger64
Source§impl From<&Prime16> for PositiveInteger128
impl From<&Prime16> for PositiveInteger128
Source§impl From<&Prime16> for PositiveInteger16
impl From<&Prime16> for PositiveInteger16
Source§impl From<&Prime16> for PositiveInteger32
impl From<&Prime16> for PositiveInteger32
Source§impl From<&Prime16> for PositiveInteger64
impl From<&Prime16> for PositiveInteger64
Source§impl From<&mut Prime16> for Integer128
impl From<&mut Prime16> for Integer128
Source§impl From<&mut Prime16> for IntegerBig
Available on crate feature dashu-int only.
impl From<&mut Prime16> for IntegerBig
Available on crate feature
dashu-int only.Source§impl From<&mut Prime16> for NonNegativeInteger128
impl From<&mut Prime16> for NonNegativeInteger128
Source§impl From<&mut Prime16> for NonNegativeInteger16
impl From<&mut Prime16> for NonNegativeInteger16
Source§impl From<&mut Prime16> for NonNegativeInteger32
impl From<&mut Prime16> for NonNegativeInteger32
Source§impl From<&mut Prime16> for NonNegativeInteger64
impl From<&mut Prime16> for NonNegativeInteger64
Source§impl From<&mut Prime16> for NonZeroInteger128
impl From<&mut Prime16> for NonZeroInteger128
Source§impl From<&mut Prime16> for NonZeroInteger32
impl From<&mut Prime16> for NonZeroInteger32
Source§impl From<&mut Prime16> for NonZeroInteger64
impl From<&mut Prime16> for NonZeroInteger64
Source§impl From<&mut Prime16> for PositiveInteger128
impl From<&mut Prime16> for PositiveInteger128
Source§impl From<&mut Prime16> for PositiveInteger16
impl From<&mut Prime16> for PositiveInteger16
Source§impl From<&mut Prime16> for PositiveInteger32
impl From<&mut Prime16> for PositiveInteger32
Source§impl From<&mut Prime16> for PositiveInteger64
impl From<&mut Prime16> for PositiveInteger64
Source§impl From<Prime16> for Integer128
impl From<Prime16> for Integer128
Source§impl From<Prime16> for IntegerBig
Available on crate feature dashu-int only.
impl From<Prime16> for IntegerBig
Available on crate feature
dashu-int only.Source§impl From<Prime16> for NonNegativeInteger128
impl From<Prime16> for NonNegativeInteger128
Source§impl From<Prime16> for NonNegativeInteger16
impl From<Prime16> for NonNegativeInteger16
Source§impl From<Prime16> for NonNegativeInteger32
impl From<Prime16> for NonNegativeInteger32
Source§impl From<Prime16> for NonNegativeInteger64
impl From<Prime16> for NonNegativeInteger64
Source§impl From<Prime16> for NonZeroInteger128
impl From<Prime16> for NonZeroInteger128
Source§impl From<Prime16> for NonZeroInteger32
impl From<Prime16> for NonZeroInteger32
Source§impl From<Prime16> for NonZeroInteger64
impl From<Prime16> for NonZeroInteger64
Source§impl From<Prime16> for PositiveInteger128
impl From<Prime16> for PositiveInteger128
Source§impl From<Prime16> for PositiveInteger16
impl From<Prime16> for PositiveInteger16
Source§impl From<Prime16> for PositiveInteger32
impl From<Prime16> for PositiveInteger32
Source§impl From<Prime16> for PositiveInteger64
impl From<Prime16> for PositiveInteger64
Source§impl Ident for Prime16
impl Ident for Prime16
Source§fn can_neg_one(&self) -> bool
fn can_neg_one(&self) -> bool
Returns
true if the number can represent -1,
the additive inverse of the multiplicative identity. Read moreSource§fn is_neg_one(&self) -> bool
fn is_neg_one(&self) -> bool
Returns
true if the current value is -1,
the additive inverse of the multiplicative identity.Source§impl LowerBounded for Prime16
impl LowerBounded for Prime16
Source§impl Number for Prime16
impl Number for Prime16
Source§type InnermostRepr = u16
type InnermostRepr = u16
The innermost primitive representation of the number. Read more
Source§fn from_inner_repr(value: Self::InnerRepr) -> NumeraResult<Self>
fn from_inner_repr(value: Self::InnerRepr) -> NumeraResult<Self>
Forms a new number from its given
inner representation. Read moreSource§unsafe fn from_inner_repr_unchecked(value: Self::InnerRepr) -> Self
unsafe fn from_inner_repr_unchecked(value: Self::InnerRepr) -> Self
Available on crate feature
not(safe) only.Forms a new number from its given
inner representation. Read moreSource§fn from_innermost_repr(value: Self::InnermostRepr) -> NumeraResult<Self>
fn from_innermost_repr(value: Self::InnermostRepr) -> NumeraResult<Self>
Forms a new number from its
innermost representation. Read moreSource§unsafe fn from_innermost_repr_unchecked(value: Self::InnermostRepr) -> Self
unsafe fn from_innermost_repr_unchecked(value: Self::InnermostRepr) -> Self
Available on crate feature
not(safe) only.Forms a new number from its
innermost representation. Read moreSource§fn into_inner_repr(self) -> Self::InnerRepr
fn into_inner_repr(self) -> Self::InnerRepr
Deconstructs the number to its inner representation.
Source§fn into_innermost_repr(self) -> Self::InnermostRepr
fn into_innermost_repr(self) -> Self::InnermostRepr
Deconstructs the number to its innermost representation.
Source§fn try_from_inner_repr(inner: impl Into<Self::InnerRepr>) -> NumeraResult<Self>where
Self: Sized,
fn try_from_inner_repr(inner: impl Into<Self::InnerRepr>) -> NumeraResult<Self>where
Self: Sized,
Forms a new number from its converted given
inner representation. Read moreSource§impl Ord for Prime16
impl Ord for Prime16
Source§impl PartialOrd for Prime16
impl PartialOrd for Prime16
Source§impl Sign for Prime16
impl Sign for Prime16
Source§fn can_positive(&self) -> bool
fn can_positive(&self) -> bool
Returns
true if the type can represent positive numbers.Source§fn can_negative(&self) -> bool
fn can_negative(&self) -> bool
Returns
true if the type can represent negative numbers.Source§fn is_positive(&self) -> bool
fn is_positive(&self) -> bool
Returns
true if the value is positive (> 0).Source§fn is_negative(&self) -> bool
fn is_negative(&self) -> bool
Returns
true if the value is negative (< 0).Source§impl TryFrom<&Prime16> for Integer16
Available on crate feature try_from only.
impl TryFrom<&Prime16> for Integer16
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<&Prime16> for Integer8
Available on crate feature try_from only.
impl TryFrom<&Prime16> for Integer8
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<&Prime16> for NegativeInteger128
Available on crate feature try_from only.
impl TryFrom<&Prime16> for NegativeInteger128
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &Prime16) -> NumeraResult<NegativeInteger128>
fn try_from(_f: &Prime16) -> NumeraResult<NegativeInteger128>
Performs the conversion.
Source§impl TryFrom<&Prime16> for NegativeInteger16
Available on crate feature try_from only.
impl TryFrom<&Prime16> for NegativeInteger16
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &Prime16) -> NumeraResult<NegativeInteger16>
fn try_from(_f: &Prime16) -> NumeraResult<NegativeInteger16>
Performs the conversion.
Source§impl TryFrom<&Prime16> for NegativeInteger32
Available on crate feature try_from only.
impl TryFrom<&Prime16> for NegativeInteger32
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &Prime16) -> NumeraResult<NegativeInteger32>
fn try_from(_f: &Prime16) -> NumeraResult<NegativeInteger32>
Performs the conversion.
Source§impl TryFrom<&Prime16> for NegativeInteger64
Available on crate feature try_from only.
impl TryFrom<&Prime16> for NegativeInteger64
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &Prime16) -> NumeraResult<NegativeInteger64>
fn try_from(_f: &Prime16) -> NumeraResult<NegativeInteger64>
Performs the conversion.
Source§impl TryFrom<&Prime16> for NegativeInteger8
Available on crate feature try_from only.
impl TryFrom<&Prime16> for NegativeInteger8
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &Prime16) -> NumeraResult<NegativeInteger8>
fn try_from(_f: &Prime16) -> NumeraResult<NegativeInteger8>
Performs the conversion.
Source§impl TryFrom<&Prime16> for NonNegativeInteger8
Available on crate feature try_from only.
impl TryFrom<&Prime16> for NonNegativeInteger8
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(f: &Prime16) -> NumeraResult<NonNegativeInteger8>
fn try_from(f: &Prime16) -> NumeraResult<NonNegativeInteger8>
Performs the conversion.
Source§impl TryFrom<&Prime16> for NonPositiveInteger128
Available on crate feature try_from only.
impl TryFrom<&Prime16> for NonPositiveInteger128
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &Prime16) -> NumeraResult<NonPositiveInteger128>
fn try_from(_f: &Prime16) -> NumeraResult<NonPositiveInteger128>
Performs the conversion.
Source§impl TryFrom<&Prime16> for NonPositiveInteger16
Available on crate feature try_from only.
impl TryFrom<&Prime16> for NonPositiveInteger16
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &Prime16) -> NumeraResult<NonPositiveInteger16>
fn try_from(_f: &Prime16) -> NumeraResult<NonPositiveInteger16>
Performs the conversion.
Source§impl TryFrom<&Prime16> for NonPositiveInteger32
Available on crate feature try_from only.
impl TryFrom<&Prime16> for NonPositiveInteger32
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &Prime16) -> NumeraResult<NonPositiveInteger32>
fn try_from(_f: &Prime16) -> NumeraResult<NonPositiveInteger32>
Performs the conversion.
Source§impl TryFrom<&Prime16> for NonPositiveInteger64
Available on crate feature try_from only.
impl TryFrom<&Prime16> for NonPositiveInteger64
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &Prime16) -> NumeraResult<NonPositiveInteger64>
fn try_from(_f: &Prime16) -> NumeraResult<NonPositiveInteger64>
Performs the conversion.
Source§impl TryFrom<&Prime16> for NonPositiveInteger8
Available on crate feature try_from only.
impl TryFrom<&Prime16> for NonPositiveInteger8
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &Prime16) -> NumeraResult<NonPositiveInteger8>
fn try_from(_f: &Prime16) -> NumeraResult<NonPositiveInteger8>
Performs the conversion.
Source§impl TryFrom<&Prime16> for NonZeroInteger16
Available on crate feature try_from only.
impl TryFrom<&Prime16> for NonZeroInteger16
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(f: &Prime16) -> NumeraResult<NonZeroInteger16>
fn try_from(f: &Prime16) -> NumeraResult<NonZeroInteger16>
Performs the conversion.
Source§impl TryFrom<&Prime16> for NonZeroInteger8
Available on crate feature try_from only.
impl TryFrom<&Prime16> for NonZeroInteger8
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(f: &Prime16) -> NumeraResult<NonZeroInteger8>
fn try_from(f: &Prime16) -> NumeraResult<NonZeroInteger8>
Performs the conversion.
Source§impl TryFrom<&Prime16> for PositiveInteger8
Available on crate feature try_from only.
impl TryFrom<&Prime16> for PositiveInteger8
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(f: &Prime16) -> NumeraResult<PositiveInteger8>
fn try_from(f: &Prime16) -> NumeraResult<PositiveInteger8>
Performs the conversion.
Source§impl TryFrom<&mut Prime16> for Integer16
Available on crate feature try_from only.
impl TryFrom<&mut Prime16> for Integer16
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<&mut Prime16> for Integer8
Available on crate feature try_from only.
impl TryFrom<&mut Prime16> for Integer8
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<&mut Prime16> for NegativeInteger128
Available on crate feature try_from only.
impl TryFrom<&mut Prime16> for NegativeInteger128
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &mut Prime16) -> NumeraResult<NegativeInteger128>
fn try_from(_f: &mut Prime16) -> NumeraResult<NegativeInteger128>
Performs the conversion.
Source§impl TryFrom<&mut Prime16> for NegativeInteger16
Available on crate feature try_from only.
impl TryFrom<&mut Prime16> for NegativeInteger16
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &mut Prime16) -> NumeraResult<NegativeInteger16>
fn try_from(_f: &mut Prime16) -> NumeraResult<NegativeInteger16>
Performs the conversion.
Source§impl TryFrom<&mut Prime16> for NegativeInteger32
Available on crate feature try_from only.
impl TryFrom<&mut Prime16> for NegativeInteger32
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &mut Prime16) -> NumeraResult<NegativeInteger32>
fn try_from(_f: &mut Prime16) -> NumeraResult<NegativeInteger32>
Performs the conversion.
Source§impl TryFrom<&mut Prime16> for NegativeInteger64
Available on crate feature try_from only.
impl TryFrom<&mut Prime16> for NegativeInteger64
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &mut Prime16) -> NumeraResult<NegativeInteger64>
fn try_from(_f: &mut Prime16) -> NumeraResult<NegativeInteger64>
Performs the conversion.
Source§impl TryFrom<&mut Prime16> for NegativeInteger8
Available on crate feature try_from only.
impl TryFrom<&mut Prime16> for NegativeInteger8
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &mut Prime16) -> NumeraResult<NegativeInteger8>
fn try_from(_f: &mut Prime16) -> NumeraResult<NegativeInteger8>
Performs the conversion.
Source§impl TryFrom<&mut Prime16> for NonNegativeInteger8
Available on crate feature try_from only.
impl TryFrom<&mut Prime16> for NonNegativeInteger8
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(f: &mut Prime16) -> NumeraResult<NonNegativeInteger8>
fn try_from(f: &mut Prime16) -> NumeraResult<NonNegativeInteger8>
Performs the conversion.
Source§impl TryFrom<&mut Prime16> for NonPositiveInteger128
Available on crate feature try_from only.
impl TryFrom<&mut Prime16> for NonPositiveInteger128
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &mut Prime16) -> NumeraResult<NonPositiveInteger128>
fn try_from(_f: &mut Prime16) -> NumeraResult<NonPositiveInteger128>
Performs the conversion.
Source§impl TryFrom<&mut Prime16> for NonPositiveInteger16
Available on crate feature try_from only.
impl TryFrom<&mut Prime16> for NonPositiveInteger16
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &mut Prime16) -> NumeraResult<NonPositiveInteger16>
fn try_from(_f: &mut Prime16) -> NumeraResult<NonPositiveInteger16>
Performs the conversion.
Source§impl TryFrom<&mut Prime16> for NonPositiveInteger32
Available on crate feature try_from only.
impl TryFrom<&mut Prime16> for NonPositiveInteger32
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &mut Prime16) -> NumeraResult<NonPositiveInteger32>
fn try_from(_f: &mut Prime16) -> NumeraResult<NonPositiveInteger32>
Performs the conversion.
Source§impl TryFrom<&mut Prime16> for NonPositiveInteger64
Available on crate feature try_from only.
impl TryFrom<&mut Prime16> for NonPositiveInteger64
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &mut Prime16) -> NumeraResult<NonPositiveInteger64>
fn try_from(_f: &mut Prime16) -> NumeraResult<NonPositiveInteger64>
Performs the conversion.
Source§impl TryFrom<&mut Prime16> for NonPositiveInteger8
Available on crate feature try_from only.
impl TryFrom<&mut Prime16> for NonPositiveInteger8
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: &mut Prime16) -> NumeraResult<NonPositiveInteger8>
fn try_from(_f: &mut Prime16) -> NumeraResult<NonPositiveInteger8>
Performs the conversion.
Source§impl TryFrom<&mut Prime16> for NonZeroInteger16
Available on crate feature try_from only.
impl TryFrom<&mut Prime16> for NonZeroInteger16
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(f: &mut Prime16) -> NumeraResult<NonZeroInteger16>
fn try_from(f: &mut Prime16) -> NumeraResult<NonZeroInteger16>
Performs the conversion.
Source§impl TryFrom<&mut Prime16> for NonZeroInteger8
Available on crate feature try_from only.
impl TryFrom<&mut Prime16> for NonZeroInteger8
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(f: &mut Prime16) -> NumeraResult<NonZeroInteger8>
fn try_from(f: &mut Prime16) -> NumeraResult<NonZeroInteger8>
Performs the conversion.
Source§impl TryFrom<&mut Prime16> for PositiveInteger8
Available on crate feature try_from only.
impl TryFrom<&mut Prime16> for PositiveInteger8
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(f: &mut Prime16) -> NumeraResult<PositiveInteger8>
fn try_from(f: &mut Prime16) -> NumeraResult<PositiveInteger8>
Performs the conversion.
Source§impl TryFrom<Prime128> for Prime16
impl TryFrom<Prime128> for Prime16
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<Prime16> for Integer16
Available on crate feature try_from only.
impl TryFrom<Prime16> for Integer16
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<Prime16> for Integer8
Available on crate feature try_from only.
impl TryFrom<Prime16> for Integer8
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<Prime16> for NegativeInteger128
Available on crate feature try_from only.
impl TryFrom<Prime16> for NegativeInteger128
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: Prime16) -> NumeraResult<NegativeInteger128>
fn try_from(_f: Prime16) -> NumeraResult<NegativeInteger128>
Performs the conversion.
Source§impl TryFrom<Prime16> for NegativeInteger16
Available on crate feature try_from only.
impl TryFrom<Prime16> for NegativeInteger16
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: Prime16) -> NumeraResult<NegativeInteger16>
fn try_from(_f: Prime16) -> NumeraResult<NegativeInteger16>
Performs the conversion.
Source§impl TryFrom<Prime16> for NegativeInteger32
Available on crate feature try_from only.
impl TryFrom<Prime16> for NegativeInteger32
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: Prime16) -> NumeraResult<NegativeInteger32>
fn try_from(_f: Prime16) -> NumeraResult<NegativeInteger32>
Performs the conversion.
Source§impl TryFrom<Prime16> for NegativeInteger64
Available on crate feature try_from only.
impl TryFrom<Prime16> for NegativeInteger64
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: Prime16) -> NumeraResult<NegativeInteger64>
fn try_from(_f: Prime16) -> NumeraResult<NegativeInteger64>
Performs the conversion.
Source§impl TryFrom<Prime16> for NegativeInteger8
Available on crate feature try_from only.
impl TryFrom<Prime16> for NegativeInteger8
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: Prime16) -> NumeraResult<NegativeInteger8>
fn try_from(_f: Prime16) -> NumeraResult<NegativeInteger8>
Performs the conversion.
Source§impl TryFrom<Prime16> for NonNegativeInteger8
Available on crate feature try_from only.
impl TryFrom<Prime16> for NonNegativeInteger8
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(f: Prime16) -> NumeraResult<NonNegativeInteger8>
fn try_from(f: Prime16) -> NumeraResult<NonNegativeInteger8>
Performs the conversion.
Source§impl TryFrom<Prime16> for NonPositiveInteger128
Available on crate feature try_from only.
impl TryFrom<Prime16> for NonPositiveInteger128
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: Prime16) -> NumeraResult<NonPositiveInteger128>
fn try_from(_f: Prime16) -> NumeraResult<NonPositiveInteger128>
Performs the conversion.
Source§impl TryFrom<Prime16> for NonPositiveInteger16
Available on crate feature try_from only.
impl TryFrom<Prime16> for NonPositiveInteger16
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: Prime16) -> NumeraResult<NonPositiveInteger16>
fn try_from(_f: Prime16) -> NumeraResult<NonPositiveInteger16>
Performs the conversion.
Source§impl TryFrom<Prime16> for NonPositiveInteger32
Available on crate feature try_from only.
impl TryFrom<Prime16> for NonPositiveInteger32
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: Prime16) -> NumeraResult<NonPositiveInteger32>
fn try_from(_f: Prime16) -> NumeraResult<NonPositiveInteger32>
Performs the conversion.
Source§impl TryFrom<Prime16> for NonPositiveInteger64
Available on crate feature try_from only.
impl TryFrom<Prime16> for NonPositiveInteger64
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: Prime16) -> NumeraResult<NonPositiveInteger64>
fn try_from(_f: Prime16) -> NumeraResult<NonPositiveInteger64>
Performs the conversion.
Source§impl TryFrom<Prime16> for NonPositiveInteger8
Available on crate feature try_from only.
impl TryFrom<Prime16> for NonPositiveInteger8
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(_f: Prime16) -> NumeraResult<NonPositiveInteger8>
fn try_from(_f: Prime16) -> NumeraResult<NonPositiveInteger8>
Performs the conversion.
Source§impl TryFrom<Prime16> for NonZeroInteger16
Available on crate feature try_from only.
impl TryFrom<Prime16> for NonZeroInteger16
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(f: Prime16) -> NumeraResult<NonZeroInteger16>
fn try_from(f: Prime16) -> NumeraResult<NonZeroInteger16>
Performs the conversion.
Source§impl TryFrom<Prime16> for NonZeroInteger8
Available on crate feature try_from only.
impl TryFrom<Prime16> for NonZeroInteger8
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(f: Prime16) -> NumeraResult<NonZeroInteger8>
fn try_from(f: Prime16) -> NumeraResult<NonZeroInteger8>
Performs the conversion.
Source§impl TryFrom<Prime16> for PositiveInteger8
Available on crate feature try_from only.
impl TryFrom<Prime16> for PositiveInteger8
Available on crate feature
try_from only.Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§fn try_from(f: Prime16) -> NumeraResult<PositiveInteger8>
fn try_from(f: Prime16) -> NumeraResult<PositiveInteger8>
Performs the conversion.
Source§impl TryFrom<Prime16> for Prime8
impl TryFrom<Prime16> for Prime8
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<Prime16> for i16
impl TryFrom<Prime16> for i16
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<Prime16> for i8
impl TryFrom<Prime16> for i8
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<Prime16> for isize
impl TryFrom<Prime16> for isize
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<Prime16> for u8
impl TryFrom<Prime16> for u8
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<Prime32> for Prime16
impl TryFrom<Prime32> for Prime16
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<Prime64> for Prime16
impl TryFrom<Prime64> for Prime16
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<i128> for Prime16
impl TryFrom<i128> for Prime16
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<i16> for Prime16
impl TryFrom<i16> for Prime16
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<i32> for Prime16
impl TryFrom<i32> for Prime16
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<i64> for Prime16
impl TryFrom<i64> for Prime16
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<i8> for Prime16
impl TryFrom<i8> for Prime16
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<isize> for Prime16
impl TryFrom<isize> for Prime16
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<u128> for Prime16
impl TryFrom<u128> for Prime16
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<u16> for Prime16
impl TryFrom<u16> for Prime16
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<u32> for Prime16
impl TryFrom<u32> for Prime16
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<u64> for Prime16
impl TryFrom<u64> for Prime16
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl TryFrom<usize> for Prime16
impl TryFrom<usize> for Prime16
Source§type Error = NumeraErrors
type Error = NumeraErrors
The type returned in the event of a conversion error.
Source§impl UpperBounded for Prime16
impl UpperBounded for Prime16
impl Copy for Prime16
impl Eq for Prime16
impl NonNegative for Prime16
impl NonOne for Prime16
impl NonZero for Prime16
impl Positive for Prime16
impl StructuralPartialEq for Prime16
Auto Trait Implementations§
impl Freeze for Prime16
impl RefUnwindSafe for Prime16
impl Send for Prime16
impl Sync for Prime16
impl Unpin for Prime16
impl UnwindSafe for Prime16
Blanket Implementations§
Source§impl<T> Also for T
impl<T> Also for T
Source§impl<T, Res> Apply<Res> for Twhere
T: ?Sized,
impl<T, Res> Apply<Res> for Twhere
T: ?Sized,
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.