pub trait Print {
// Required methods
fn print_loading(&self, is_done: bool);
fn print_running_test(
&self,
idents: &Vec<String>,
ident: &String,
is_done: bool,
is_ok: bool,
);
fn print_empty_line(&self);
fn print_successes(&self);
fn print_failures(&self);
fn print_test_result(
&self,
idents: &Vec<String>,
ident: &String,
test_result: &TestResult,
) -> Result<()>;
fn print_test_counts(
&self,
passed_test_count: usize,
failed_test_count: usize,
);
fn print_lf_for_error(&self);
}Expand description
A printer trait.
The printer prints messages for a test result.
Required Methods§
Sourcefn print_loading(&self, is_done: bool)
fn print_loading(&self, is_done: bool)
Prints the “Loading tests …” message.
Sourcefn print_running_test(
&self,
idents: &Vec<String>,
ident: &String,
is_done: bool,
is_ok: bool,
)
fn print_running_test( &self, idents: &Vec<String>, ident: &String, is_done: bool, is_ok: bool, )
Prints the test running with the test identifier.
This method prints “ok” for the test success or “FAILED” for the test failure if the test is done, otherwise “FAILED”.
Sourcefn print_empty_line(&self)
fn print_empty_line(&self)
Prints an empty line.
Sourcefn print_successes(&self)
fn print_successes(&self)
Prints the “Successes:” message.
Sourcefn print_failures(&self)
fn print_failures(&self)
Prints the “Failures:” message.
Sourcefn print_test_result(
&self,
idents: &Vec<String>,
ident: &String,
test_result: &TestResult,
) -> Result<()>
fn print_test_result( &self, idents: &Vec<String>, ident: &String, test_result: &TestResult, ) -> Result<()>
Prints the test result with data from the standard output and the standard error.
Sourcefn print_test_counts(&self, passed_test_count: usize, failed_test_count: usize)
fn print_test_counts(&self, passed_test_count: usize, failed_test_count: usize)
Prints the number of passed tests and the number of failed tests.
Sourcefn print_lf_for_error(&self)
fn print_lf_for_error(&self)
Prints the newline character for an occurred error.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".