pub trait ExampleData {
// Required method
fn example_data() -> Self;
}
Expand description
A trait for providing example data of an item.
Required Methods§
Sourcefn example_data() -> Self
fn example_data() -> Self
Get an example instance of the current datatype.
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.