auto_sized_unsigned

Macro auto_sized_unsigned 

Source
auto_sized_unsigned!() { /* proc-macro */ }
Expand description

Returns the smallest unsigned integer type (u8, u16, u32, u64, or u128) that can represent the given literal.

ยงExamples

use autosized_num::auto_sized_unsigned;

type T = auto_sized_unsigned!(300);
// expands to: type T = u16;