Crate u256_literal[][src]

Expand description

This crate provides u256! macro for converting u256 literals to actual primitive_types::U256 at compile time. This is helpful when you’re trying to define a const U256.

It supports 0x prefix and normal decimals. When the number is too large to fit into U256, it would complain.

This crate assumes you have primitive-types added to your Cargo.toml dependency.

Examples

let x = u256!(123454444444444444444444444444444444444444444);
let y = u256!(0x123456789827823721235568483);

Macros