pub struct Retry<'a> { /* private fields */ }
Expand description
State for managing retrying a network operation.
Implementations§
source§impl<'a> Retry<'a>
impl<'a> Retry<'a>
pub fn new(config: &'a Config) -> CargoResult<Retry<'a>>
sourcepub fn try<T>(&mut self, f: impl FnOnce() -> CargoResult<T>) -> RetryResult<T>
pub fn try<T>(&mut self, f: impl FnOnce() -> CargoResult<T>) -> RetryResult<T>
Calls the given callback, and returns a RetryResult
which
indicates whether or not this needs to be called again at some point
in the future to retry the operation if it failed.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Retry<'a>
impl<'a> !Send for Retry<'a>
impl<'a> !Sync for Retry<'a>
impl<'a> Unpin for Retry<'a>
impl<'a> !UnwindSafe for Retry<'a>
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