Struct test_casing::decorators::Timeout
source · pub struct Timeout(pub Duration);
Expand description
Test decorator that fails a wrapped test if it doesn’t complete
in the specified Duration
.
§Examples
use test_casing::{decorate, decorators::Timeout};
#[test]
#[decorate(Timeout::secs(5))]
fn test_with_timeout() {
// test logic
}
Tuple Fields§
§0: Duration
Implementations§
Trait Implementations§
source§impl<R: Send + 'static> DecorateTest<R> for Timeout
impl<R: Send + 'static> DecorateTest<R> for Timeout
source§fn decorate_and_test<F: TestFn<R>>(&self, test_fn: F) -> R
fn decorate_and_test<F: TestFn<R>>(&self, test_fn: F) -> R
Decorates the provided test function and runs the test.
impl Copy for Timeout
Auto Trait Implementations§
impl Freeze for Timeout
impl RefUnwindSafe for Timeout
impl Send for Timeout
impl Sync for Timeout
impl Unpin for Timeout
impl UnwindSafe for Timeout
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)