Module_execute

Function Module_execute 

Source
pub unsafe fn Module_execute(
    self_: Pin<&mut Module>,
    method_name: &CxxString,
    inputs: ArrayRefEValue,
    outputs: *mut VecEValue,
) -> Error
Available on crate feature module only.
Expand description

Execute a specific method with the given input values and retrieve the output values. Loads the program and method before executing if needed.

§Arguments

  • method_name: The name of the method to execute.
  • inputs: A vector of input values to be passed to the method.
  • outputs: A mutable reference to a vector that will be filled with the output values from the method.

§Returns

A error indicating whether the execution was successful or not.

§Safety

The outputs vector must be valid for the lifetime of the function. The outputs vector can be used only if the function returns Error::Ok.