Skip to main content

Take

Trait Take 

Source
pub trait Take {
    // Required methods
    fn assert_that(&mut self, t: bool) -> bool;
    fn take(&mut self, t: bool, s: &str, e: &str) -> &mut Self;
    fn check(&mut self, t: bool, s: &str, e: &str);
}
Expand description

§Calculate the time of the test function

Required Methods§

Source

fn assert_that(&mut self, t: bool) -> bool

§run assertion
  • t The test
Source

fn take(&mut self, t: bool, s: &str, e: &str) -> &mut Self

§Run assert and measure execution time
  • t The test
  • s The success output message
  • e The error output message
Source

fn check(&mut self, t: bool, s: &str, e: &str)

§Run an assert and measure the time
  • t The test
  • s The success output message
  • e The error output message

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§