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
48
49
//! This crate implements 256-bit integer types.
//!
//! The implementation tries to follow as closely as possible to primitive
//! integer types, and should implement all the common methods and traits as the
//! primitive integer types.

#![deny(missing_docs)]
#![no_std]

#[cfg(test)]
extern crate alloc;

#[macro_use]
mod macros {
    #[macro_use]
    pub mod cmp;
    #[macro_use]
    pub mod fmt;
    #[macro_use]
    pub mod ops;
    #[macro_use]
    pub mod iter;
}

mod error;
mod fmt;
mod int;
pub mod intrinsics;
#[cfg(feature = "serde")]
pub mod serde;
mod uint;

/// Convenience re-export of 256-integer types and as- conversion traits.
pub mod prelude {
    pub use crate::{AsI256, AsU256, I256, U256};
}

pub use crate::{
    int::{AsI256, I256},
    uint::{AsU256, U256},
};

/// A 256-bit signed integer type.
#[allow(non_camel_case_types)]
pub type i256 = I256;

/// A 256-bit unsigned integer type.
#[allow(non_camel_case_types)]
pub type u256 = U256;