#[non_exhaustive]pub struct PollingConfig {
pub interval: Duration,
pub max_attempts: usize,
}Expand description
Polling settings used while waiting for an asynchronous task.
Construct this with Self::new or Self::default; it is
#[non_exhaustive] so that new settings can be added without a breaking
change.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.interval: DurationDelay applied before every result query, including the first one.
A freshly created task is still queued for a worker, so querying
immediately after creation almost always reports processing. Waiting
one interval first avoids that wasted request.
max_attempts: usizeMaximum number of result queries before returning a timeout error.
Implementations§
Trait Implementations§
Source§impl Clone for PollingConfig
impl Clone for PollingConfig
impl Copy for PollingConfig
Source§impl Debug for PollingConfig
impl Debug for PollingConfig
Source§impl Default for PollingConfig
impl Default for PollingConfig
impl Eq for PollingConfig
Source§impl PartialEq for PollingConfig
impl PartialEq for PollingConfig
impl StructuralPartialEq for PollingConfig
Auto Trait Implementations§
impl Freeze for PollingConfig
impl RefUnwindSafe for PollingConfig
impl Send for PollingConfig
impl Sync for PollingConfig
impl Unpin for PollingConfig
impl UnsafeUnpin for PollingConfig
impl UnwindSafe for PollingConfig
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