Trait cairo_lang_sierra::extensions::modules::int::IntTraits
source · pub trait IntTraits: Default {
type IntType: TryFrom<BigInt> + Into<BigInt> + Copy;
const IS_SMALL: bool;
const GENERIC_TYPE_ID: GenericTypeId;
const CONST: &'static str;
const EQUAL: &'static str;
const TO_FELT252: &'static str;
const TRY_FROM_FELT252: &'static str;
}
Expand description
Trait for implementing integers.
Required Associated Types§
Required Associated Constants§
sourceconst IS_SMALL: bool
const IS_SMALL: bool
Is the type smaller than 128 bits. Relevant since some implementations are different due to range check being 128 bits based.
sourceconst GENERIC_TYPE_ID: GenericTypeId
const GENERIC_TYPE_ID: GenericTypeId
The generic type id for this type.
sourceconst TO_FELT252: &'static str
const TO_FELT252: &'static str
The generic libfunc id for conversion to felt252.
sourceconst TRY_FROM_FELT252: &'static str
const TRY_FROM_FELT252: &'static str
The generic libfunc id for conversion from felt252.
Object Safety§
This trait is not object safe.