cairo_lang_sierra::extensions::modules::int::unsigned

Trait UintTraits

source
pub trait UintTraits: IntTraits {
    const OVERFLOWING_ADD: &'static str;
    const OVERFLOWING_SUB: &'static str;
    const SQUARE_ROOT: &'static str;
    const SQUARE_ROOT_TYPE_ID: GenericTypeId;
    const DIVMOD: &'static str;
    const BITWISE: &'static str;
}
Expand description

Trait for implementing unsigned integers.

Required Associated Constants§

source

const OVERFLOWING_ADD: &'static str

The generic libfunc id for addition.

source

const OVERFLOWING_SUB: &'static str

The generic libfunc id for subtraction.

source

const SQUARE_ROOT: &'static str

The generic libfunc id for calculating the integer square root.

source

const SQUARE_ROOT_TYPE_ID: GenericTypeId

The generic type id for the type’s square root.

source

const DIVMOD: &'static str

The generic libfunc id that divides two integers.

source

const BITWISE: &'static str

The generic libfunc id that provides bitwise operations on two integers.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

source§

impl UintTraits for Uint128Traits

source§

const OVERFLOWING_ADD: &'static str = "u128_overflowing_add"

source§

const OVERFLOWING_SUB: &'static str = "u128_overflowing_sub"

source§

const SQUARE_ROOT: &'static str = "u128_sqrt"

source§

const SQUARE_ROOT_TYPE_ID: GenericTypeId = <Uint64Type as NamedType>::ID

source§

const DIVMOD: &'static str = "u128_safe_divmod"

source§

const BITWISE: &'static str = "bitwise"

source§

impl UintTraits for Uint8Traits

source§

const OVERFLOWING_ADD: &'static str = "u8_overflowing_add"

source§

const OVERFLOWING_SUB: &'static str = "u8_overflowing_sub"

source§

const SQUARE_ROOT: &'static str = "u8_sqrt"

source§

const SQUARE_ROOT_TYPE_ID: GenericTypeId = <Self as IntTraits>::GENERIC_TYPE_ID

source§

const DIVMOD: &'static str = "u8_safe_divmod"

source§

const BITWISE: &'static str = "u8_bitwise"

source§

impl UintTraits for Uint16Traits

source§

const OVERFLOWING_ADD: &'static str = "u16_overflowing_add"

source§

const OVERFLOWING_SUB: &'static str = "u16_overflowing_sub"

source§

const SQUARE_ROOT: &'static str = "u16_sqrt"

source§

const SQUARE_ROOT_TYPE_ID: GenericTypeId = <Uint8Type as NamedType>::ID

source§

const DIVMOD: &'static str = "u16_safe_divmod"

source§

const BITWISE: &'static str = "u16_bitwise"

source§

impl UintTraits for Uint32Traits

source§

const OVERFLOWING_ADD: &'static str = "u32_overflowing_add"

source§

const OVERFLOWING_SUB: &'static str = "u32_overflowing_sub"

source§

const SQUARE_ROOT: &'static str = "u32_sqrt"

source§

const SQUARE_ROOT_TYPE_ID: GenericTypeId = <Uint16Type as NamedType>::ID

source§

const DIVMOD: &'static str = "u32_safe_divmod"

source§

const BITWISE: &'static str = "u32_bitwise"

source§

impl UintTraits for Uint64Traits

source§

const OVERFLOWING_ADD: &'static str = "u64_overflowing_add"

source§

const OVERFLOWING_SUB: &'static str = "u64_overflowing_sub"

source§

const SQUARE_ROOT: &'static str = "u64_sqrt"

source§

const SQUARE_ROOT_TYPE_ID: GenericTypeId = <Uint32Type as NamedType>::ID

source§

const DIVMOD: &'static str = "u64_safe_divmod"

source§

const BITWISE: &'static str = "u64_bitwise"