Function brane_cli::run::run_dummy_vm

source ·
pub async fn run_dummy_vm(
    state: &mut DummyVmState,
    what: impl AsRef<str>,
    snippet: impl AsRef<str>,
) -> Result<FullValue, Error>
Expand description

Function that executes the given workflow snippet to completion on the dummy machine, returning the result it returns.

§Arguments

  • state: The DummyVmState that we use to run the dummy VM.
  • what: The thing we’re running. Either a filename, or something like stdin.
  • snippet: The snippet (as raw text) to compile and run.

§Returns

The FullValue that the workflow returned, if any. If there was no value, returns FullValue::Void instead.

§Errors

This function errors if we failed to compile or run the workflow somehow.