pub struct PostgresLockConfig {
pub connection: PostgresConnection,
pub use_transaction: bool,
pub keepalive_cadence: Option<Duration>,
}Expand description
Configuration for PostgreSQL distributed locks.
Fields§
§connection: PostgresConnectionConnection source.
use_transaction: boolWhether to use transaction-scoped locks.
keepalive_cadence: Option<Duration>Keepalive cadence for long-held locks.
Implementations§
Source§impl PostgresLockConfig
impl PostgresLockConfig
Sourcepub fn new(connection: PostgresConnection) -> PostgresLockConfig
pub fn new(connection: PostgresConnection) -> PostgresLockConfig
Creates a new configuration.
Trait Implementations§
Source§impl Clone for PostgresLockConfig
impl Clone for PostgresLockConfig
Source§fn clone(&self) -> PostgresLockConfig
fn clone(&self) -> PostgresLockConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PostgresLockConfig
impl !RefUnwindSafe for PostgresLockConfig
impl Send for PostgresLockConfig
impl Sync for PostgresLockConfig
impl Unpin for PostgresLockConfig
impl !UnwindSafe for PostgresLockConfig
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<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>
Converts
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>
Converts
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