Struct test::test::TestTimeOptions
source · pub struct TestTimeOptions {
pub error_on_excess: bool,
pub unit_threshold: TimeThreshold,
pub integration_threshold: TimeThreshold,
pub doctest_threshold: TimeThreshold,
}
🔬This is a nightly-only experimental API. (
test
)Expand description
具有用于计算测试执行时间的参数的结构体。
Fields§
§error_on_excess: 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§
source§impl TestTimeOptions
impl TestTimeOptions
pub fn new_from_env(error_on_excess: 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§
source§impl Clone for TestTimeOptions
impl Clone for TestTimeOptions
source§fn clone(&self) -> TestTimeOptions
fn clone(&self) -> TestTimeOptions
返回值的副本。 Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
从
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
返回类型的 “默认值”。 Read more
source§impl PartialEq<TestTimeOptions> for TestTimeOptions
impl PartialEq<TestTimeOptions> for TestTimeOptions
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
从拥有的值中借用。 Read more