Module corelib

Source

Enums§

CoreTraitContext
The context for a core library trait.
ErrorPropagationType
LiteralError

Functions§

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
copy_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
core_downcast
The function downcast from the integer submodule.
core_felt252_is_zero
core_felt252_ty
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.
deref_mut_trait
deref_trait
destruct_trait
destruct_trait_fn
drop_trait
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_eq
felt252_sub
fn_call_trait_fn
fn_once_call_trait_fn
fn_once_trait
fn_trait
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_trait
Given a core library context and trait name, returns TraitId.
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
into_iterator_trait
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 ().
numeric_literal_trait
option_none_variant
Generates a ConcreteVariant instance for Option::None.
option_some_variant
Generates a ConcreteVariant instance for Option::Some.
panic_destruct_trait
panic_destruct_trait_fn
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.