Skip to main content

Case

Trait Case 

Source
pub trait Case:
    Debug
    + Send
    + Sync
    + Sized
    + 'static {
    // Required methods
    fn load(path: &Path) -> Result<Self, Error>;
    fn run(self) -> Result<(), Error>;

    // Provided method
    fn description(&self) -> String { ... }
}
Expand description

A single test case, capable of loading a JSON description of itself and running it.

See https://ethereum-tests.readthedocs.io/ for test specs.

Required Methods§

Source

fn load(path: &Path) -> Result<Self, Error>

Load the test from the given file path.

The file can be assumed to be a valid EF test case as described on https://ethereum-tests.readthedocs.io/.

Source

fn run(self) -> Result<(), Error>

Run the test.

Provided Methods§

Source

fn description(&self) -> String

A description of the test.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§