pub trait ClassPath {
// Required method
fn class_path() -> String;
}
Expand description
ClassPath that will be used in the construction of the fixture.
It must be pascal case and have its parts separated by a .
. Eg: Fixtures.Calculator
The #[fixture]
macro will automatically implement it for the type in the impl block.
By default, the macro will get the current module path and add the fixutre type. For example, a fixutre with the type Calculator
inside the module examples::calculator::fixtures
will be converted to a path like Examples.Calculator.Fixtures.Calculator
.
You can use a custom path by passing it to the macro as such
use rust_slim::fixture;
#[derive(Default)]
struct Fixture {}
#[fixture("AnotherPath.MyFixutre")]
impl Fixture {}
Required Methods§
fn class_path() -> String
Object Safety§
This trait is not object safe.