pub trait Theory {
// Required methods
fn chaos(&mut self, callback: &dyn Fn() -> bool) -> &mut Self;
fn theorem<T: PartialEq>(
&mut self,
expected: T,
actual: &dyn Fn() -> T,
) -> &mut Self;
fn theory<T: PartialEq>(
&mut self,
expected: T,
callback: &dyn Fn() -> T,
) -> &mut Self;
}
Expand description
§Add theory useful method
Required Methods§
Sourcefn chaos(&mut self, callback: &dyn Fn() -> bool) -> &mut Self
fn chaos(&mut self, callback: &dyn Fn() -> bool) -> &mut Self
§A theory must be equal to false
callback
The callback to execute
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.