cairo_vm::types::relocatable

Function relocate_value

Source
pub fn relocate_value(
    value: MaybeRelocatable,
    relocation_table: &[usize],
) -> Result<Felt252, MemoryError>
Expand description

Turns a MaybeRelocatable into a Felt252 value. If the value is an Int, it will extract the Felt252 value from it. If the value is RelocatableValue, it will relocate it according to the relocation_table