pub trait Fixture: Sized {
type Output;
// Required method
fn build(self) -> Self::Output;
// Provided method
fn build_with<F>(self, f: F) -> Self::Output
where F: FnOnce(&mut Self::Output) { ... }
}Expand description
Fixture trait for test data builders
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn build_with<F>(self, f: F) -> Self::Output
fn build_with<F>(self, f: F) -> Self::Output
Build with custom modifications
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.