Skip to main content

MappingArrayHandler

Trait MappingArrayHandler 

Source
pub trait MappingArrayHandler {
    // Required method
    fn get_mapping_or_array_value(
        &self,
        root: DynSolValue,
        indices: Vec<DynSolValue>,
        snapshot_id: usize,
    ) -> Result<DynSolValue>;
}
Expand description

Handler trait for mapping and array access operations.

Handles indexing operations like mapping[key], array[index], and nested access like mapping[key1][key2]. Supports both storage-based mappings and in-memory arrays.

Required Methods§

Source

fn get_mapping_or_array_value( &self, root: DynSolValue, indices: Vec<DynSolValue>, snapshot_id: usize, ) -> Result<DynSolValue>

Access a mapping or array with the given indices.

§Arguments
  • root - The base value being indexed (mapping, array, or ABI info)
  • indices - Vector of index values for nested access
  • snapshot_id - The execution context identifier
§Returns

The value at the specified indices, or an error if access fails

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl MappingArrayHandler for Arc<SimulationDebugHandler>

Source§

fn get_mapping_or_array_value( &self, root: DynSolValue, indices: Vec<DynSolValue>, snapshot_id: usize, ) -> Result<DynSolValue>

Implementors§