Struct tester::test::TestTimeOptions
source · pub struct TestTimeOptions {
pub error_on_excess: bool,
pub colored: bool,
pub unit_threshold: TimeThreshold,
pub integration_threshold: TimeThreshold,
pub doctest_threshold: TimeThreshold,
}
Expand description
Structure with parameters for calculating test execution time.
Fields§
§error_on_excess: bool
Denotes if the test critical execution time limit excess should be considered a test failure.
colored: bool
§unit_threshold: TimeThreshold
§integration_threshold: TimeThreshold
§doctest_threshold: TimeThreshold
Implementations§
source§impl TestTimeOptions
impl TestTimeOptions
pub fn new_from_env(error_on_excess: bool, colored: bool) -> Self
pub fn is_warn(&self, test: &TestDesc, exec_time: &TestExecTime) -> bool
pub fn is_critical(&self, test: &TestDesc, exec_time: &TestExecTime) -> bool
Trait Implementations§
source§impl Clone for TestTimeOptions
impl Clone for TestTimeOptions
source§fn clone(&self) -> TestTimeOptions
fn clone(&self) -> TestTimeOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TestTimeOptions
impl Debug for TestTimeOptions
source§impl Default for TestTimeOptions
impl Default for TestTimeOptions
source§fn default() -> TestTimeOptions
fn default() -> TestTimeOptions
Returns the “default value” for a type. Read more
source§impl PartialEq<TestTimeOptions> for TestTimeOptions
impl PartialEq<TestTimeOptions> for TestTimeOptions
source§fn eq(&self, other: &TestTimeOptions) -> bool
fn eq(&self, other: &TestTimeOptions) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for TestTimeOptions
impl Eq for TestTimeOptions
impl StructuralEq for TestTimeOptions
impl StructuralPartialEq for TestTimeOptions
Auto Trait Implementations§
impl RefUnwindSafe for TestTimeOptions
impl Send for TestTimeOptions
impl Sync for TestTimeOptions
impl Unpin for TestTimeOptions
impl UnwindSafe for TestTimeOptions
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more