pub struct PgNotifyIntentSource { /* private fields */ }Expand description
Thin sqlx PgListener wrapper for invalidation wake-ups.
The source intentionally does not apply invalidation by itself. It lets a worker wake up and drain the durable outbox sooner; missed notifications are recovered by the normal polling path.
Implementations§
Source§impl PgNotifyIntentSource
impl PgNotifyIntentSource
Sourcepub async fn connect(
database_url: &str,
channel: &str,
) -> Result<PgNotifyIntentSource, DbCacheError>
pub async fn connect( database_url: &str, channel: &str, ) -> Result<PgNotifyIntentSource, DbCacheError>
Connect a listener and subscribe to one channel.
Sourcepub async fn recv(&mut self) -> Result<PgNotifyIntent, DbCacheError>
pub async fn recv(&mut self) -> Result<PgNotifyIntent, DbCacheError>
Receive the next notification intent.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PgNotifyIntentSource
impl !UnwindSafe for PgNotifyIntentSource
impl Freeze for PgNotifyIntentSource
impl Send for PgNotifyIntentSource
impl Sync for PgNotifyIntentSource
impl Unpin for PgNotifyIntentSource
impl UnsafeUnpin for PgNotifyIntentSource
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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