Struct test::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,
}
🔬 This is a nightly-only experimental API. (
test
)Expand description
Structure with parameters for calculating test execution time.
Fields
error_on_excess: bool
🔬 This is a nightly-only experimental API. (
test
)Denotes if the test critical execution time limit excess should be considered a test failure.
colored: bool
🔬 This is a nightly-only experimental API. (
test
)unit_threshold: TimeThreshold
🔬 This is a nightly-only experimental API. (
test
)integration_threshold: TimeThreshold
🔬 This is a nightly-only experimental API. (
test
)doctest_threshold: TimeThreshold
🔬 This is a nightly-only experimental API. (
test
)Implementations
sourceimpl TestTimeOptions
impl TestTimeOptions
pub fn new_from_env(error_on_excess: bool, colored: bool) -> Self
🔬 This is a nightly-only experimental API. (
test
)pub fn is_warn(&self, test: &TestDesc, exec_time: &TestExecTime) -> bool
🔬 This is a nightly-only experimental API. (
test
)pub fn is_critical(&self, test: &TestDesc, exec_time: &TestExecTime) -> bool
🔬 This is a nightly-only experimental API. (
test
)Trait Implementations
sourceimpl Clone for TestTimeOptions
impl Clone for TestTimeOptions
sourcefn clone(&self) -> TestTimeOptions
fn clone(&self) -> TestTimeOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TestTimeOptions
impl Debug for TestTimeOptions
sourceimpl Default for TestTimeOptions
impl Default for TestTimeOptions
sourcefn default() -> TestTimeOptions
fn default() -> TestTimeOptions
Returns the “default value” for a type. Read more
sourceimpl PartialEq<TestTimeOptions> for TestTimeOptions
impl PartialEq<TestTimeOptions> for TestTimeOptions
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &TestTimeOptions) -> bool
fn ne(&self, other: &TestTimeOptions) -> bool
This method tests for !=
.
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more