pub struct PostgresStoreOptions { /* private fields */ }Expand description
Bounded connection, transaction, and lease settings for crate::PostgresStore.
Implementations§
Source§impl PostgresStoreOptions
impl PostgresStoreOptions
Sourcepub const fn transport_security(&self) -> PostgresTransportSecurity
pub const fn transport_security(&self) -> PostgresTransportSecurity
Returns the configured transport policy.
Sourcepub const fn lease_duration(&self) -> Duration
pub const fn lease_duration(&self) -> Duration
Returns the duration assigned to a newly acquired worker lease.
Sourcepub const fn maximum_lease_horizon(&self) -> Duration
pub const fn maximum_lease_horizon(&self) -> Duration
Returns the maximum expiry horizon accepted by lease renewal.
Sourcepub const fn with_transport_security(
self,
transport_security: PostgresTransportSecurity,
) -> Self
pub const fn with_transport_security( self, transport_security: PostgresTransportSecurity, ) -> Self
Overrides the transport policy.
Sourcepub const fn with_pool_size(self, minimum: u32, maximum: u32) -> Self
pub const fn with_pool_size(self, minimum: u32, maximum: u32) -> Self
Sets the inclusive pool-size bounds.
Sourcepub const fn with_acquire_timeout(self, timeout: Duration) -> Self
pub const fn with_acquire_timeout(self, timeout: Duration) -> Self
Sets the maximum wait for a pooled connection.
Sourcepub const fn with_idle_timeout(self, timeout: Option<Duration>) -> Self
pub const fn with_idle_timeout(self, timeout: Option<Duration>) -> Self
Sets the idle connection lifetime, or disables idle retirement.
Sourcepub const fn with_max_lifetime(self, lifetime: Option<Duration>) -> Self
pub const fn with_max_lifetime(self, lifetime: Option<Duration>) -> Self
Sets the absolute connection lifetime, or disables lifetime retirement.
Sourcepub const fn with_transaction_timeouts(
self,
lock_timeout: Duration,
statement_timeout: Duration,
) -> Self
pub const fn with_transaction_timeouts( self, lock_timeout: Duration, statement_timeout: Duration, ) -> Self
Sets per-transaction PostgreSQL lock and statement timeouts.
Sourcepub const fn with_lease_timing(
self,
lease_duration: Duration,
maximum_lease_horizon: Duration,
) -> Self
pub const fn with_lease_timing( self, lease_duration: Duration, maximum_lease_horizon: Duration, ) -> Self
Sets initial lease duration and the maximum accepted renewal horizon.
Sourcepub const fn with_outbox_attempt_lease(self, lease_duration: Duration) -> Self
pub const fn with_outbox_attempt_lease(self, lease_duration: Duration) -> Self
Sets the fixed, non-renewable lease for one outbox network attempt.
Validation rejects zero, sub-microsecond, or greater-than-five-minute values when the store connects. Adapter request timeouts must be lower than this lease.
Trait Implementations§
Source§impl Clone for PostgresStoreOptions
impl Clone for PostgresStoreOptions
Source§impl Debug for PostgresStoreOptions
impl Debug for PostgresStoreOptions
Auto Trait Implementations§
impl Forget for PostgresStoreOptions
impl Freeze for PostgresStoreOptions
impl Move for PostgresStoreOptions
impl RefUnwindSafe for PostgresStoreOptions
impl Send for PostgresStoreOptions
impl Sync for PostgresStoreOptions
impl Unpin for PostgresStoreOptions
impl UnsafeUnpin for PostgresStoreOptions
impl UnwindSafe for PostgresStoreOptions
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
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more