Crate extprim_literals [−] [src]
Literal macros for extprim
.
This crate provides a syntex extension (on stable) so that the extprim
types can be
constructed at compile-time using the i128!()
and u128!()
macros.
Setup
Simply add extprim_literals
to dependencies in Cargo.toml
:
[dependencies]
extprim_literals = "2.0"
Use the macros in src/consts.rs
:
#[macro_use] extern crate extprim_literals; extern crate extprim; use extprim::u128::u128; const TEN: u128 = u128!(10);
Reexports
pub use extprim_literals_macros::*; |
Macros
i128 |
Creates a signed 128-bit integer at compile time. The content can be any integer literals supported by Rust, e.g. |
u128 |
Creates an unsigned 128-bit integer at compile time. The content can be any integer literals supported by Rust, e.g. |
Functions
register |
[ Deprecated ] Provided for backward-compatibility only. This method does nothing. |