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