[][src]Enum cranelift_reader::RunCommand

pub enum RunCommand {
    Print(Invocation),
    Run(InvocationComparisonVec<DataValue>),
}

A run command appearing in a test file.

For parsing, see Parser::parse_run_command

Variants

Print(Invocation)

Invoke a function and print its result.

Invoke a function and compare its result to a value sequence.

Implementations

impl RunCommand[src]

pub fn run<F>(&self, invoke_fn: F) -> Result<(), String> where
    F: FnOnce(&str, &[DataValue]) -> Result<Vec<DataValue>, String>, 
[src]

Run the RunCommand:

  • for RunCommand::Print, print the returned values from invoking the function.
  • for RunCommand::Run, compare the returned values from the invoked function and return an Err with a descriptive string if the comparison fails.

Accepts a function used for invoking the actual execution of the command. This function, invoked_fn, is passed the function name and function arguments of the Invocation.

Trait Implementations

impl Debug for RunCommand[src]

impl Display for RunCommand[src]

impl PartialEq<RunCommand> for RunCommand[src]

impl StructuralPartialEq for RunCommand[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.