pub struct AutoSleep {
pub threshold: Duration,
pub io_errors_as_flood_of: Option<Duration>,
}Expand description
Automatically sleep on FLOOD_WAIT and retry once on I/O errors.
Fields§
§threshold: Duration§io_errors_as_flood_of: Option<Duration>Trait Implementations§
Source§impl RetryPolicy for AutoSleep
impl RetryPolicy for AutoSleep
fn should_retry(&self, ctx: &RetryContext) -> ControlFlow<(), Duration>
Auto Trait Implementations§
impl Freeze for AutoSleep
impl RefUnwindSafe for AutoSleep
impl Send for AutoSleep
impl Sync for AutoSleep
impl Unpin for AutoSleep
impl UnsafeUnpin for AutoSleep
impl UnwindSafe for AutoSleep
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