pub struct InMemoryStreamCursor { /* private fields */ }Expand description
A cursor on one durable. Several cursors may share a durable, as several pullers may share a JetStream durable: an unsettled delivery is withheld from the others until its ack wait expires, then redelivered to whichever pulls next.
Trait Implementations§
Source§impl Drop for InMemoryStreamCursor
A dropped cursor gives its unsettled delivery back at once instead of after
the ack wait, so a reopened cursor in the same process replays it without
waiting (JetStream would wait for the ack wait to run out). The delivery
still counts towards the message’s delivery count.
impl Drop for InMemoryStreamCursor
A dropped cursor gives its unsettled delivery back at once instead of after the ack wait, so a reopened cursor in the same process replays it without waiting (JetStream would wait for the ack wait to run out). The delivery still counts towards the message’s delivery count.
Source§impl StreamCursor for InMemoryStreamCursor
impl StreamCursor for InMemoryStreamCursor
fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = BusResult<Option<StreamDelivery>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ack<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = BusResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn nak<'life0, 'async_trait>(
&'life0 mut self,
delay: Duration,
) -> Pin<Box<dyn Future<Output = BusResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn term<'life0, 'life1, 'async_trait>(
&'life0 mut self,
reason: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = BusResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn term<'life0, 'life1, 'async_trait>(
&'life0 mut self,
reason: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = BusResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Settles the current delivery terminally: it is not acknowledged as
processed and it is never redelivered (JetStream
+TERM). reason
is recorded with the termination where the backend can carry one
(JetStream’s +TERM <reason>), for example body_absent.Source§fn in_progress<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = BusResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn in_progress<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = BusResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Reports that the current delivery is still being worked on (JetStream
+WPI): the ack-wait clock restarts from now, so a handler slower than
one ack wait is not redelivered under it. The delivery stays in flight
and must still be settled with ack, nak or term.Auto Trait Implementations§
impl !RefUnwindSafe for InMemoryStreamCursor
impl !UnwindSafe for InMemoryStreamCursor
impl Forget for InMemoryStreamCursor
impl Freeze for InMemoryStreamCursor
impl Send for InMemoryStreamCursor
impl Sync for InMemoryStreamCursor
impl Unpin for InMemoryStreamCursor
impl UnsafeUnpin for InMemoryStreamCursor
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