Struct humannum::Int
[−]
[src]
pub struct Int<T: PrimInt>(_);
A wrapper for integers that has FromStr
implementation
This is useful if you want to use it somewhere where FromStr
is
expected.
See parse_integer
for the description of the format.
Example
use humannum::Int; let x: Int<u64> = " 12_500 M ".parse().unwrap(); assert_eq!(*x, 12_500_000_000)
Trait Implementations
impl<T: Debug + PrimInt> Debug for Int<T>
[src]
impl<T: PartialEq + PrimInt> PartialEq for Int<T>
[src]
fn eq(&self, __arg_0: &Int<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Int<T>) -> bool
This method tests for !=
.
impl<T: Eq + PrimInt> Eq for Int<T>
[src]
impl<T: Hash + PrimInt> Hash for Int<T>
[src]
fn hash<__HT: Hasher>(&self, __arg_0: &mut __HT)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T: Clone + PrimInt> Clone for Int<T>
[src]
fn clone(&self) -> Int<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: Copy + PrimInt> Copy for Int<T>
[src]
impl<T: PrimInt> AsRef<T> for Int<T>
[src]
fn as_ref(&self) -> &T
Performs the conversion.
impl<T: PrimInt> Deref for Int<T>
[src]
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &T
The method called to dereference a value