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]

Formats the value using the given formatter.

impl<T: PartialEq + PrimInt> PartialEq for Int<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Eq + PrimInt> Eq for Int<T>
[src]

impl<T: Hash + PrimInt> Hash for Int<T>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<T: Clone + PrimInt> Clone for Int<T>
[src]

Returns a copy of the value. Read more

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]

Performs the conversion.

impl<T: PrimInt> Deref for Int<T>
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<T: PrimInt> From<T> for Int<T>
[src]

Performs the conversion.

impl<T: PrimInt> FromStr for Int<T>
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more