1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
//! This module defines aliases for many constants. It is generated by typenum's build //! script. //! //! For unsigned integers, the format is `U` followed by the number. We define aliases for //! //! - Numbers 0 through 1024 //! - Powers of 2 below `u64::MAX` //! - Powers of 10 below `u64::MAX` //! //! These alias definitions look like this: //! //! ```rust //! use typenum::{B0, B1, UInt, UTerm}; //! //! type U6 = UInt<UInt<UInt<UTerm, B1>, B1>, B0>; //! ``` //! //! For positive signed integers, the format is `P` followed by the number and for negative //! signed integers it is `N` followed by the number. For the signed integer zero, we use //! `Z0`. We define aliases for //! //! - Numbers -1024 through 1024 //! - Powers of 2 between `i64::MIN` and `i64::MAX` //! - Powers of 10 between `i64::MIN` and `i64::MAX` //! //! These alias definitions look like this: //! //! ```rust //! use typenum::{B0, B1, UInt, UTerm, PInt, NInt}; //! //! # #[allow(dead_code)] //! type P6 = PInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>>; //! type N6 = NInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>>; //! ``` //! //! # Example //! ```rust //! # #[allow(unused_imports)] //! use typenum::{U0, U1, U2, U3, U4, U5, U6}; //! # #[allow(unused_imports)] //! use typenum::{N3, N2, N1, Z0, P1, P2, P3}; //! # #[allow(unused_imports)] //! use typenum::{U774, N17, N10000, P1024, P4096}; //! ``` //! #![allow(missing_docs)] include!(concat!(env!("OUT_DIR"), "/consts.rs"));