Struct test_casing::decorators::Retry
source · pub struct Retry { /* private fields */ }
Expand description
Test decorator that retries a wrapped test the specified number of times, potentially with a delay between retries.
§Examples
use test_casing::{decorate, decorators::Retry};
use std::time::Duration;
const RETRY_DELAY: Duration = Duration::from_millis(200);
#[test]
#[decorate(Retry::times(3).with_delay(RETRY_DELAY))]
fn test_with_retries() {
// test logic
}
Implementations§
Trait Implementations§
source§impl DecorateTest<()> for Retry
impl DecorateTest<()> for Retry
source§fn decorate_and_test<F: TestFn<()>>(&self, test_fn: F)
fn decorate_and_test<F: TestFn<()>>(&self, test_fn: F)
Decorates the provided test function and runs the test.
Auto Trait Implementations§
impl RefUnwindSafe for Retry
impl Send for Retry
impl Sync for Retry
impl Unpin for Retry
impl UnwindSafe for Retry
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