pub struct PollPlan {
pub max_polls: u32,
pub poll_interval: Duration,
pub partition_concurrency: usize,
pub row_cap: Option<usize>,
}Expand description
How a 202 handle is polled: how many times, and how long to wait between
GETs.
Fields§
§max_polls: u32Maximum number of poll GETs before LifecycleErrorCode::PollQuotaExhausted.
poll_interval: DurationWall-clock delay the async driver waits between successive poll GETs on a
still-running (202) handle. The pure machine carries this as data only;
the crate::driver performs the cancel-aware sleep. The transport only
backs off on retryable statuses (429/5xx); a 202 returns
immediately, so without this interval the poll loop would spin with no gap.
partition_concurrency: usizeHow many non-inline partitions the driver fetches concurrently once a result set completes (a window; assembly stays in partition order).
row_cap: Option<usize>Stop fetching further partitions once at least this many rows are
assembled. The statement then completes early and reports itself
partial (CompletedStatement::is_partial).
Implementations§
Source§impl PollPlan
impl PollPlan
Sourcepub fn with_max_polls(max_polls: u32) -> Self
pub fn with_max_polls(max_polls: u32) -> Self
A plan with an explicit poll ceiling (clamped to at least 1), keeping the default inter-poll interval.
Sourcepub fn with_poll_interval(self, poll_interval: Duration) -> Self
pub fn with_poll_interval(self, poll_interval: Duration) -> Self
Set the inter-poll wait, clamped to MIN_POLL_INTERVAL so the 202 poll
loop can never become a tight spin.
Sourcepub fn effective_poll_interval(&self) -> Duration
pub fn effective_poll_interval(&self) -> Duration
The effective inter-poll wait, never below MIN_POLL_INTERVAL even if the
public field was set directly.
Sourcepub fn with_partition_concurrency(self, concurrency: usize) -> Self
pub fn with_partition_concurrency(self, concurrency: usize) -> Self
Set the partition fetch window, clamped to 1..=MAX_PARTITION_CONCURRENCY.
Sourcepub fn with_row_cap(self, row_cap: Option<usize>) -> Self
pub fn with_row_cap(self, row_cap: Option<usize>) -> Self
Stop fetching partitions once row_cap rows are assembled (None fetches
every partition).
Sourcepub fn effective_partition_concurrency(&self) -> usize
pub fn effective_partition_concurrency(&self) -> usize
The effective window size, never zero even if the field was set directly.
Trait Implementations§
impl Copy for PollPlan
impl Eq for PollPlan
impl StructuralPartialEq for PollPlan
Auto Trait Implementations§
impl Freeze for PollPlan
impl RefUnwindSafe for PollPlan
impl Send for PollPlan
impl Sync for PollPlan
impl Unpin for PollPlan
impl UnsafeUnpin for PollPlan
impl UnwindSafe for PollPlan
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.