pub struct Retry { /* private fields */ }
Implementations§
Source§impl Retry
impl Retry
pub fn new() -> Self
pub fn retries(self) -> u32
pub fn set_retries(self, num_retries: u32) -> Self
pub fn sleep_duration(self) -> SleepDuration
pub fn set_sleep_duration<S>(self, sleep_duration: S) -> Selfwhere
S: Into<SleepDuration>,
pub async fn run_fn<'a, T, F, O, E>(self, fn_task: T) -> Result<O, E>
pub async fn run<'a, T, O, E>(self, task: T) -> Result<O, E>
pub fn build_task<'a, T, O, E>(self, task: T) -> RetryTask<T>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Retry
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