mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-26 07:37:57 +00:00
b208daed7e
Signed-off-by: xermicus <cyrill@parity.io>
26 lines
914 B
Rust
26 lines
914 B
Rust
//!
|
|
//! The common sizes in bits.
|
|
//!
|
|
|
|
/// The `bool` type bit-length.
|
|
pub const BIT_LENGTH_BOOLEAN: usize = 1;
|
|
|
|
/// The `u8` type or byte bit-length.
|
|
pub const BIT_LENGTH_BYTE: usize = 8;
|
|
|
|
/// The x86 word type (usually `u32`) bit-length.
|
|
pub const BIT_LENGTH_X32: usize = crate::byte_length::BYTE_LENGTH_X32 * BIT_LENGTH_BYTE;
|
|
|
|
/// The x86_64 word type (usually `u64`) bit-length.
|
|
pub const BIT_LENGTH_X64: usize = crate::byte_length::BYTE_LENGTH_X64 * BIT_LENGTH_BYTE;
|
|
|
|
/// The ETH address (usually `u160`) bit-length.
|
|
pub const BIT_LENGTH_ETH_ADDRESS: usize =
|
|
crate::byte_length::BYTE_LENGTH_ETH_ADDRESS * BIT_LENGTH_BYTE;
|
|
|
|
/// The field (usually `u256` or `i256`) bit-length.
|
|
pub const BIT_LENGTH_FIELD: usize = crate::byte_length::BYTE_LENGTH_FIELD * BIT_LENGTH_BYTE;
|
|
|
|
/// Bit length of the runtime value type.
|
|
pub const BIT_LENGTH_VALUE: usize = crate::byte_length::BYTE_LENGTH_VALUE * BIT_LENGTH_BYTE;
|