Trait ink_ir::HexLiteral

source ·
pub trait HexLiteral {
    fn hex_suffixed(self) -> LitInt;
    fn hex_unsuffixed(self) -> LitInt;
    fn hex_padded_suffixed(self) -> LitInt;
    fn hex_padded_unsuffixed(self) -> LitInt;
}
Expand description

Used to convert literal values into their hex representations for code generation.

Required Methods§

source

fn hex_suffixed(self) -> LitInt

Converts the given value into a hex represented literal with type suffix.

source

fn hex_unsuffixed(self) -> LitInt

Converts the given value into a hex represented literal without type suffix.

source

fn hex_padded_suffixed(self) -> LitInt

Converts the given value into a hex represented literal with type suffix.

The resulting hex encoded literal is padded with zeros.

source

fn hex_padded_unsuffixed(self) -> LitInt

Converts the given value into a hex represented literal without type suffix.

The resulting hex encoded literal is padded with zeros.

Implementations on Foreign Types§

source§

impl HexLiteral for i8

source§

impl HexLiteral for u8

source§

impl HexLiteral for i16

source§

impl HexLiteral for u16

source§

impl HexLiteral for i32

source§

impl HexLiteral for u32

source§

impl HexLiteral for i64

source§

impl HexLiteral for u64

source§

impl HexLiteral for i128

source§

impl HexLiteral for u128

source§

impl HexLiteral for usize

source§

impl HexLiteral for isize

Implementors§