pub struct PolicyPool { /* private fields */ }Expand description
Policy and telemetry decorator for pool, session, transaction, and script operations.
Pool methods execute_async/fetch_async acquire a fresh session for each configured retry attempt.
Session, transaction, and trusted-script methods do not retry.
The total-budget timer is constructed once before acquisition and checked again before each
statement dispatch, including after every synchronous hook in nested policy session wrappers.
A pre-dispatch rejection remains Cancelled/Timeout and emits no statement events.
Already-dispatched success wins simultaneous cancellation/deadline.
Other interruptions during dispatch are WriteOutcomeUnknown, even for fetches; authoritative
provider unknown-outcome errors are never replaced by cancellation/deadline or retried.
Dropping an in-flight observed operation emits one WriteOutcomeUnknown event because dispatch
completion cannot be established.
Statement events cover execution only; acquisition and transaction begin/commit/rollback
boundaries are not separately observed.
Implementations§
Source§impl PolicyPool
impl PolicyPool
Sourcepub fn new<P: Pool + 'static>(pool: P, policy: PoolPolicy) -> Self
pub fn new<P: Pool + 'static>(pool: P, policy: PoolPolicy) -> Self
Wraps a provider and applies the supplied defaults to operations made through this wrapper.
Wraps a shared provider trait object with per-pool policy.