[−][src]Enum cranelift_reader::RunCommand
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.
Run(Invocation, Comparison, Vec<DataValue>)
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]
F: FnOnce(&str, &[DataValue]) -> Result<Vec<DataValue>, String>,
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]
pub fn eq(&self, other: &RunCommand) -> bool
[src]
pub fn ne(&self, other: &RunCommand) -> bool
[src]
impl StructuralPartialEq for RunCommand
[src]
Auto Trait Implementations
impl RefUnwindSafe for RunCommand
[src]
impl Send for RunCommand
[src]
impl Sync for RunCommand
[src]
impl Unpin for RunCommand
[src]
impl UnwindSafe for RunCommand
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,