cairo_lang_sierra::extensions::modules::int::signed

Trait SintTraits

Source
pub trait SintTraits: IntTraits {
    const OVERFLOWING_ADD: &'static str;
    const OVERFLOWING_SUB: &'static str;
    const DIFF: &'static str;
    const UNSIGNED_INT_TYPE: GenericTypeId;
}
Expand description

Trait for implementing signed 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 DIFF: &'static str

The generic libfunc id for difference of signed integers, logically equivalent to subtraction of unsigned integers.

Source

const UNSIGNED_INT_TYPE: GenericTypeId

The generic type id of the equivalent unsigned integer type.

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 SintTraits for Sint128Traits

Source§

const OVERFLOWING_ADD: &'static str = "i128_overflowing_add_impl"

Source§

const OVERFLOWING_SUB: &'static str = "i128_overflowing_sub_impl"

Source§

const DIFF: &'static str = "i128_diff"

Source§

const UNSIGNED_INT_TYPE: GenericTypeId = <Uint128Type as NamedType>::ID

Source§

impl SintTraits for Sint8Traits

Source§

const OVERFLOWING_ADD: &'static str = "i8_overflowing_add_impl"

Source§

const OVERFLOWING_SUB: &'static str = "i8_overflowing_sub_impl"

Source§

const DIFF: &'static str = "i8_diff"

Source§

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

Source§

impl SintTraits for Sint16Traits

Source§

const OVERFLOWING_ADD: &'static str = "i16_overflowing_add_impl"

Source§

const OVERFLOWING_SUB: &'static str = "i16_overflowing_sub_impl"

Source§

const DIFF: &'static str = "i16_diff"

Source§

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

Source§

impl SintTraits for Sint32Traits

Source§

const OVERFLOWING_ADD: &'static str = "i32_overflowing_add_impl"

Source§

const OVERFLOWING_SUB: &'static str = "i32_overflowing_sub_impl"

Source§

const DIFF: &'static str = "i32_diff"

Source§

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

Source§

impl SintTraits for Sint64Traits

Source§

const OVERFLOWING_ADD: &'static str = "i64_overflowing_add_impl"

Source§

const OVERFLOWING_SUB: &'static str = "i64_overflowing_sub_impl"

Source§

const DIFF: &'static str = "i64_diff"

Source§

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