pub struct SuscripcionPostgres { /* private fields */ }Expand description
One consumer’s input on the db transport.
Implementations§
Trait Implementations§
Source§impl SuscripcionEventos for SuscripcionPostgres
impl SuscripcionEventos for SuscripcionPostgres
Source§fn siguiente_lote<'life0, 'async_trait>(
&'life0 mut self,
max: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<Reservado>, ErrorTransporte>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn siguiente_lote<'life0, 'async_trait>(
&'life0 mut self,
max: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<Reservado>, ErrorTransporte>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Claims the due deliveries, oldest event first. A claim counts as a delivery (attempts
goes up now, not when it is settled), so a worker that crashes mid-handle still uses one
of the event’s deliveries, and the claim is hidden for the lease.
Source§fn consumidor(&self) -> &str
fn consumidor(&self) -> &str
The consumer it delivers to — the
[[consumidor]] nombre.Source§fn resolver<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
claimed: &'life1 Reservado,
delivery: &'life2 Entrega,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorTransporte>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn resolver<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
claimed: &'life1 Reservado,
delivery: &'life2 Entrega,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorTransporte>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Ack → never again;
Reintentar { espera } → again after espera; Descartar → never again
(the dead letter is recorded before this is called).Source§fn lote_maximo(&self) -> u32
fn lote_maximo(&self) -> u32
The most claims one batch hands out, whatever
siguiente_lote is asked for. A transport that
keeps an order (Kafka: a partition) answers 1, so a Reintentar holds back what comes after
it instead of letting the handler see it first.Auto Trait Implementations§
impl !RefUnwindSafe for SuscripcionPostgres
impl !UnwindSafe for SuscripcionPostgres
impl Forget for SuscripcionPostgres
impl Freeze for SuscripcionPostgres
impl Move for SuscripcionPostgres
impl Send for SuscripcionPostgres
impl Sync for SuscripcionPostgres
impl Unpin for SuscripcionPostgres
impl UnsafeUnpin for SuscripcionPostgres
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