pub struct PoolPolicy {
pub telemetry_enabled: bool,
pub sql_capture_enabled: bool,
pub sql_hook: Option<SqlCaptureHook>,
pub observer: Option<DbObserver>,
pub retry: RetryPolicy,
pub retry_runtime: Option<RetryRuntime>,
pub default_timeout: Option<Duration>,
pub default_limit: RowLimit,
}Expand description
Pool-level defaults for telemetry, SQL capture, and retry support.
Fields§
§telemetry_enabled: boolWhether telemetry is enabled by default. No observer means no event is emitted.
sql_capture_enabled: boolWhether exact SQL capture is enabled by default. SQL literals/comments may contain secrets.
sql_hook: Option<SqlCaptureHook>SQL-only pool hook, called only when SQL capture is enabled.
observer: Option<DbObserver>Optional observer. Its panic is isolated from the database operation.
retry: RetryPolicyRetry default for standalone pool execute_async/fetch_async calls; default is Disabled.
retry_runtime: Option<RetryRuntime>Caller-owned scheduling and cancellation dependencies required when retries are enabled.
default_timeout: Option<Duration>Default statement timeout for operations that inherit. None inherits the wrapped
provider’s default; use per-query no_timeout() to request disabling it.
default_limit: RowLimitDefault bounded fetch limit for operations that inherit.
Trait Implementations§
Source§impl Clone for PoolPolicy
impl Clone for PoolPolicy
Source§impl Debug for PoolPolicy
impl Debug for PoolPolicy
Auto Trait Implementations§
impl !RefUnwindSafe for PoolPolicy
impl !UnwindSafe for PoolPolicy
impl Forget for PoolPolicy
impl Freeze for PoolPolicy
impl Move for PoolPolicy
impl Send for PoolPolicy
impl Sync for PoolPolicy
impl Unpin for PoolPolicy
impl UnsafeUnpin for PoolPolicy
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