Skip to main content

TestDefault

Trait TestDefault 

Source
pub trait TestDefault {
    // Required method
    fn test_default() -> Self;
}
Expand description

A trait for providing test-only default values.

This trait is intentionally separate from Default to make it clear that these default values are only meaningful in testing contexts and should not be used in production code.

Required Methods§

Source

fn test_default() -> Self

Creates a new instance with test-appropriate default values.

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.

Implementors§