pub trait Factory<T>: Send + Sync {
// Required method
fn build(&self) -> T;
// Provided method
fn build_batch(&self, count: usize) -> Vec<T> { ... }
}Expand description
Factory trait for creating test data
Required Methods§
Provided Methods§
Sourcefn build_batch(&self, count: usize) -> Vec<T>
fn build_batch(&self, count: usize) -> Vec<T>
Build multiple instances of the test data type.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".