pub struct RetryPolicy { /* private fields */ }Expand description
Политика повторных попыток для операций с MoexError.
Implementations§
Source§impl RetryPolicy
impl RetryPolicy
Sourcepub fn new(max_attempts: NonZeroU32) -> Self
pub fn new(max_attempts: NonZeroU32) -> Self
Создать политику повторов с числом попыток и delay по умолчанию.
Значение delay по умолчанию — 400ms.
Sourcepub fn with_delay(self, delay: Duration) -> Self
pub fn with_delay(self, delay: Duration) -> Self
Установить фиксированную паузу между попытками.
Sourcepub fn max_attempts(self) -> NonZeroU32
pub fn max_attempts(self) -> NonZeroU32
Максимальное число попыток (включая первую).
Trait Implementations§
Source§impl Clone for RetryPolicy
impl Clone for RetryPolicy
Source§fn clone(&self) -> RetryPolicy
fn clone(&self) -> RetryPolicy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RetryPolicy
impl Debug for RetryPolicy
Source§impl Default for RetryPolicy
impl Default for RetryPolicy
Source§impl PartialEq for RetryPolicy
impl PartialEq for RetryPolicy
impl Copy for RetryPolicy
impl Eq for RetryPolicy
impl StructuralPartialEq for RetryPolicy
Auto Trait Implementations§
impl Freeze for RetryPolicy
impl RefUnwindSafe for RetryPolicy
impl Send for RetryPolicy
impl Sync for RetryPolicy
impl Unpin for RetryPolicy
impl UnsafeUnpin for RetryPolicy
impl UnwindSafe for RetryPolicy
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