Module corelib
Source - CoreInfo
- Information about various core types and traits.
- ErrorPropagationType
- LiteralError
- bounded_int_ty
- Returns the concrete type of a bounded int type with a given min and max.
- concrete_copy_trait
- concrete_destruct_trait
- concrete_drop_trait
- concrete_iterator_trait
- concrete_panic_destruct_trait
- core_array_felt252_ty
- core_binary_operator
- core_bool_enum
- Generates a ConcreteEnumId instance for
bool
. - core_bool_ty
- core_box_ty
- core_crate
- Query implementation of SemanticGroup::core_crate.
- core_downcast
- The function
downcast
from the integer
submodule. - core_felt252_is_zero
- core_info
- Query implementation of SemanticGroup::core_info.
- core_module
- Query implementation of SemanticGroup::core_module.
- core_nonzero_ty
- core_option_ty
- core_result_ty
- core_submodule
- Returns a submodule of the corelib named
submodule_name
.
If no such submodule exists, panics. - core_unary_operator
- core_withdraw_gas_fns
- The gas withdrawal functions from the
gas
submodule. - false_literal_expr
- Gets a semantic expression of the literal
false
. Uses the given stable_ptr
in the returned
semantic expression. - false_variant
- Generates a ConcreteVariant instance for
false
. - felt252_sub
- fn_traits
- get_convert_to_felt252_libfunc_name_by_type
- Returns FunctionId of the libfunc that converts type of
ty
to felt252. - get_core_enum_concrete_variant
- Gets a ConcreteVariant instance for an enum variant from the core module, by name.
Assumes the variant exists.
- get_core_function_id
- Given a core library function name and its generic arguments, returns FunctionId.
- get_core_generic_function_id
- Given a core library function name, returns GenericFunctionId.
- get_core_ty_by_name
- get_enum_concrete_variant
- Gets a ConcreteVariant instance for an enum variant, by module and name.
Assumes the variant exists.
- get_function_id
- Given a module, a library function name and its generic arguments, returns FunctionId.
- get_generic_function_id
- Given a module and a library function name, returns GenericFunctionId.
- get_panic_ty
- get_submodule
- Returns the submodule of
base_module
, named submodule_name
, if exists. - get_ty_by_name
- get_usize_ty
- internal_require_implicit
- jump_nz_nonzero_variant
- Generates a ConcreteVariant instance for
IsZeroResult::<felt252>::NonZero
. - jump_nz_zero_variant
- Generates a ConcreteVariant instance for
IsZeroResult::<felt252>::Zero
. - never_ty
- Gets the never type ().
- option_none_variant
- Generates a ConcreteVariant instance for
Option::None
. - option_some_variant
- Generates a ConcreteVariant instance for
Option::Some
. - result_err_variant
- Generates a ConcreteVariant instance for
Result::Err
. - result_ok_variant
- Generates a ConcreteVariant instance for
Result::Ok
. - signed_int_result_in_range_variant
- Generates a ConcreteVariant instance for
SignedIntegerResult::InRange
. - signed_int_result_overflow_variant
- Generates a ConcreteVariant instance for
SignedIntegerResult::Overflow
. - signed_int_result_underflow_variant
- Generates a ConcreteVariant instance for
SignedIntegerResult::Underflow
. - true_literal_expr
- Gets a semantic expression of the literal
true
. Uses the given stable_ptr
in the returned
semantic expression. - true_variant
- Generates a ConcreteVariant instance for
true
. - try_extract_nz_wrapped_type
- Returns the type if the inner value of a
NonZero
type, if it is wrapped in one. - try_get_core_ty_by_name
- try_get_ty_by_name
- unit_expr
- builds a semantic unit expression. This is not necessarily located in the AST, so it is received
as a param.
- unit_ty
- Gets the unit type ().
- unwrap_error_propagation_type
- Attempts to unwrap error propagation types (Option, Result).
Returns None if not one of these types.
- validate_literal
- Validates that a given type is valid for a literal and that the value fits the range of the
specific type.