pub trait ConsumableFixture: Sized {
// Required method
fn set_up() -> Result<Self>;
}Expand description
Interface for structure to be set up before the test case.
Types implementing ConsumableFixture can be passed by value to
a test function.
ⓘ
strct MyFixture { ... }
impl ConsumableFixture for MyFixture { ... }
#[gtest]
fn test_with_fixture(my_fixture: MyFixture) {...}Required Methods§
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.