pub fn run(
file_name: &str,
function: &str,
args: &[Arg],
) -> Result<Vec<Felt252>, SierraRunnerError>Expand description
Runs the specified function with the provided arguments.
§Arguments
file_name- A string slice that holds the file name.function- A string slice that holds the function to run.args- A slice ofArgthat holds the arguments to the function.
§Returns
Result<Vec<Felt252>>- A Result containing a vector ofFelt252if the function runs successfully, or an error if it fails.
§Errors
This function will return an error if:
- The file specified by
file_namecannot be found or read. - The function specified by
functioncannot be found in the file. - The arguments provided in
argsare not valid for the function. - The function execution fails for any reason.