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