[][src]Trait atoi::MaxNumDigits

pub trait MaxNumDigits {
    fn max_num_digits(radix: Self) -> usize;
fn max_num_digits_negative(radix: Self) -> usize; }

A bounded integer, whose representation can overflow and therefore can only store a maximum number of digits

Required methods

fn max_num_digits(radix: Self) -> usize

Given a representation with a radix character I, what is the maximum number of digits we can parse without the integer overflowing for sure?

fn max_num_digits_negative(radix: Self) -> usize

Returns the maximum number of digits a negative representation of I can have depending on radix.

Loading content...

Implementors

impl<I> MaxNumDigits for I where
    I: Bounded + Zero + DivAssign + Ord + Copy
[src]

fn max_num_digits(radix: I) -> usize[src]

Returns the maximum number of digits a nonnegative representation of I can have depending on radix.

fn max_num_digits_negative(radix: I) -> usize[src]

Returns the maximum number of digits a negative representation of I can have depending on radix.

Loading content...