pub trait MaxNumDigits {
// Required methods
fn max_num_digits(radix: Self) -> usize;
fn max_num_digits_negative(radix: Self) -> usize;
}
Expand description
A bounded integer, whose representation can overflow and therefore can only store a maximum number of digits
Required Methods§
Sourcefn max_num_digits(radix: Self) -> usize
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?
Sourcefn max_num_digits_negative(radix: Self) -> usize
fn max_num_digits_negative(radix: Self) -> usize
Returns the maximum number of digits a negative representation of I
can have depending on
radix
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.