RustWorkloadFactory

Trait RustWorkloadFactory 

Source
pub trait RustWorkloadFactory {
    const FDB_API_VERSION: u32 = 740u32;

    // Required method
    fn create(name: String, context: WorkloadContext) -> WrappedWorkload;
}
Expand description

Equivalent to the C++ abstract class FDBWorkloadFactory

Provided Associated Constants§

Source

const FDB_API_VERSION: u32 = 740u32

The runtime FDB_API_VERSION to use

Required Methods§

Source

fn create(name: String, context: WorkloadContext) -> WrappedWorkload

If the test file contains a key-value pair workloadName the value will be passed to this method (empty string otherwise). This way, a library author can implement many workloads in one library and use the test file to chose which one to run (or run multiple workloads either concurrently or serially).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§