pub struct PollPolicy { /* private fields */ }Expand description
Bounded polling policy for one known run.
Implementations§
Source§impl PollPolicy
impl PollPolicy
Sourcepub fn new(
attempts: u16,
interval: Duration,
) -> Result<Self, TransportConfigError>
pub fn new( attempts: u16, interval: Duration, ) -> Result<Self, TransportConfigError>
Construct a polling policy.
§Errors
Allows 1–2000 attempts and intervals from 250 ms through 60 seconds.
Sourcepub fn secure_defaults() -> Self
pub fn secure_defaults() -> Self
Default five-second polling for at most two hours.
§Panics
This cannot panic because both constants satisfy the constructor bounds.
Trait Implementations§
Source§impl Clone for PollPolicy
impl Clone for PollPolicy
impl Copy for PollPolicy
Source§impl Debug for PollPolicy
impl Debug for PollPolicy
impl Eq for PollPolicy
Source§impl PartialEq for PollPolicy
impl PartialEq for PollPolicy
impl StructuralPartialEq for PollPolicy
Auto Trait Implementations§
impl Freeze for PollPolicy
impl RefUnwindSafe for PollPolicy
impl Send for PollPolicy
impl Sync for PollPolicy
impl Unpin for PollPolicy
impl UnsafeUnpin for PollPolicy
impl UnwindSafe for PollPolicy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.