pub struct PostgresDistributedReaderWriterLock { /* private fields */ }Expand description
A PostgreSQL-based distributed reader-writer lock.
Trait Implementations§
Source§impl DistributedReaderWriterLock for PostgresDistributedReaderWriterLock
impl DistributedReaderWriterLock for PostgresDistributedReaderWriterLock
Source§type ReadHandle = PostgresReadLockHandle
type ReadHandle = PostgresReadLockHandle
Handle type for read (shared) locks.
Source§type WriteHandle = PostgresWriteLockHandle
type WriteHandle = PostgresWriteLockHandle
Handle type for write (exclusive) locks.
Source§async fn acquire_read(
&self,
timeout: Option<Duration>,
) -> Result<<PostgresDistributedReaderWriterLock as DistributedReaderWriterLock>::ReadHandle, LockError>
async fn acquire_read( &self, timeout: Option<Duration>, ) -> Result<<PostgresDistributedReaderWriterLock as DistributedReaderWriterLock>::ReadHandle, LockError>
Acquires a read (shared) lock. Read more
Source§async fn try_acquire_read(
&self,
) -> Result<Option<<PostgresDistributedReaderWriterLock as DistributedReaderWriterLock>::ReadHandle>, LockError>
async fn try_acquire_read( &self, ) -> Result<Option<<PostgresDistributedReaderWriterLock as DistributedReaderWriterLock>::ReadHandle>, LockError>
Attempts to acquire a read lock without waiting.
Source§async fn acquire_write(
&self,
timeout: Option<Duration>,
) -> Result<<PostgresDistributedReaderWriterLock as DistributedReaderWriterLock>::WriteHandle, LockError>
async fn acquire_write( &self, timeout: Option<Duration>, ) -> Result<<PostgresDistributedReaderWriterLock as DistributedReaderWriterLock>::WriteHandle, LockError>
Acquires a write (exclusive) lock. Read more
Source§async fn try_acquire_write(
&self,
) -> Result<Option<<PostgresDistributedReaderWriterLock as DistributedReaderWriterLock>::WriteHandle>, LockError>
async fn try_acquire_write( &self, ) -> Result<Option<<PostgresDistributedReaderWriterLock as DistributedReaderWriterLock>::WriteHandle>, LockError>
Attempts to acquire a write lock without waiting.
Auto Trait Implementations§
impl Freeze for PostgresDistributedReaderWriterLock
impl !RefUnwindSafe for PostgresDistributedReaderWriterLock
impl Send for PostgresDistributedReaderWriterLock
impl Sync for PostgresDistributedReaderWriterLock
impl Unpin for PostgresDistributedReaderWriterLock
impl !UnwindSafe for PostgresDistributedReaderWriterLock
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> 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