cairo_lang_sierra::extensions::modules::try_from_felt252

Trait TryFromFelt252

Source
pub trait TryFromFelt252: Default {
    const STR_ID: &'static str;
    const GENERIC_TYPE_ID: GenericTypeId;
}
Expand description

Trait for implementing try_{ty}_from_felt252.

Required Associated Constants§

Source

const STR_ID: &'static str

The try_{ty}_from_felt252 library function id.

Source

const GENERIC_TYPE_ID: GenericTypeId

The id of the generic type to implement the library functions for.

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 TryFromFelt252 for Bytes31FromFelt252Trait

Source§

const STR_ID: &'static str = "bytes31_try_from_felt252"

Source§

const GENERIC_TYPE_ID: GenericTypeId = <Bytes31Type as NoGenericArgsGenericType>::ID

Source§

impl TryFromFelt252 for ClassHashTryFromFelt252Trait

Source§

const STR_ID: &'static str = "class_hash_try_from_felt252"

Source§

const GENERIC_TYPE_ID: GenericTypeId = <ClassHashType as NoGenericArgsGenericType>::ID

Source§

impl TryFromFelt252 for ContractAddressTryFromFelt252Libfunc

Source§

const STR_ID: &'static str = "contract_address_try_from_felt252"

Source§

const GENERIC_TYPE_ID: GenericTypeId = <ContractAddressType as NoGenericArgsGenericType>::ID

Source§

impl TryFromFelt252 for StorageAddressTryFromFelt252Trait

Source§

const STR_ID: &'static str = "storage_address_try_from_felt252"

Source§

const GENERIC_TYPE_ID: GenericTypeId = <StorageAddressType as NoGenericArgsGenericType>::ID

Source§

impl<TIntTraits: IntTraits> TryFromFelt252 for IntFromFelt252Trait<TIntTraits>

Source§

const STR_ID: &'static str = TIntTraits::TRY_FROM_FELT252

Source§

const GENERIC_TYPE_ID: GenericTypeId = TIntTraits::GENERIC_TYPE_ID