pub struct PipelinedSubscriber<Inner, F: Form> { /* private fields */ }Expand description
A pipelined subscription: the form’s own subscriber and the window its deliveries settle in.
The window flushes what it still owes when the subscription stops.
Trait Implementations§
Source§impl BatchSubscriber for PipelinedSubscriber<RedisSubscriber, StreamForm>
impl BatchSubscriber for PipelinedSubscriber<RedisSubscriber, StreamForm>
Source§fn batches(
&mut self,
size: NonZeroUsize,
) -> impl Stream<Item = Result<Self::Batch, Self::Error>> + Send + '_
fn batches( &mut self, size: NonZeroUsize, ) -> impl Stream<Item = Result<Self::Batch, Self::Error>> + Send + '_
Yields one batch per read, size being the read’s COUNT; the batch is one segment of the
window, so its settles leave as one XACK.
§Cancel safety
As RedisSubscriber’s batches: entries fetched and not yet settled stay pending.
Source§type Batch = Vec<RoundMessage<StreamForm>>
type Batch = Vec<RoundMessage<StreamForm>>
batches. Implementations choose between Vec, custom
iterators, or anything else that yields the underlying Subscriber::Message.Source§impl BatchSubscriber for PipelinedSubscriber<ChannelReader, PubSubForm>
impl BatchSubscriber for PipelinedSubscriber<ChannelReader, PubSubForm>
Source§fn batches(
&mut self,
size: NonZeroUsize,
) -> impl Stream<Item = Result<Self::Batch, Self::Error>> + Send + '_
fn batches( &mut self, size: NonZeroUsize, ) -> impl Stream<Item = Result<Self::Batch, Self::Error>> + Send + '_
Yields a batch of the messages already arrived, up to size; the batch is one segment of
the window.
§Cancel safety
As a Pub/Sub subscription’s: a message nobody is polling for is lost.
Source§type Batch = Vec<RoundMessage<PubSubForm>>
type Batch = Vec<RoundMessage<PubSubForm>>
batches. Implementations choose between Vec, custom
iterators, or anything else that yields the underlying Subscriber::Message.Source§impl BatchSubscriber for PipelinedSubscriber<ListReader, ListForm>
impl BatchSubscriber for PipelinedSubscriber<ListReader, ListForm>
Source§fn batches(
&mut self,
size: NonZeroUsize,
) -> impl Stream<Item = Result<Self::Batch, Self::Error>> + Send + '_
fn batches( &mut self, size: NonZeroUsize, ) -> impl Stream<Item = Result<Self::Batch, Self::Error>> + Send + '_
Yields one batch per read of up to size entries; the batch is one segment of the window.
§Cancel safety
As a list subscription’s batches: on a reliable list an entry claimed and not settled stays on the processing list.
Source§type Batch = Vec<RoundMessage<ListForm>>
type Batch = Vec<RoundMessage<ListForm>>
batches. Implementations choose between Vec, custom
iterators, or anything else that yields the underlying Subscriber::Message.Source§impl<Inner, F: Form> Debug for PipelinedSubscriber<Inner, F>
impl<Inner, F: Form> Debug for PipelinedSubscriber<Inner, F>
Source§impl<Inner, F: Form> Drop for PipelinedSubscriber<Inner, F>
impl<Inner, F: Form> Drop for PipelinedSubscriber<Inner, F>
Source§impl Seekable for PipelinedSubscriber<RedisSubscriber, StreamForm>
Repositions the consumer group as the subscription without a window does, which is what a
mount site’s start_at(..) seeks through.
impl Seekable for PipelinedSubscriber<RedisSubscriber, StreamForm>
Repositions the consumer group as the subscription without a window does, which is what a
mount site’s start_at(..) seeks through.
Source§type Seeker = RedisGroupSeeker
type Seeker = RedisGroupSeeker
Source§fn seeker(&self) -> RedisGroupSeeker
fn seeker(&self) -> RedisGroupSeeker
Source§impl Subscriber for PipelinedSubscriber<RedisSubscriber, StreamForm>
impl Subscriber for PipelinedSubscriber<RedisSubscriber, StreamForm>
Source§fn stream(
&mut self,
) -> impl Stream<Item = Result<Self::Message, Self::Error>> + Send + '_
fn stream( &mut self, ) -> impl Stream<Item = Result<Self::Message, Self::Error>> + Send + '_
Yields one delivery per entry, each with a slot in the window.
§Cancel safety
As RedisSubscriber’s: entries fetched and not yet settled stay pending.
Source§type Message = RoundMessage<StreamForm>
type Message = RoundMessage<StreamForm>
Source§type Error = RedisError
type Error = RedisError
Source§impl Subscriber for PipelinedSubscriber<ChannelReader, PubSubForm>
impl Subscriber for PipelinedSubscriber<ChannelReader, PubSubForm>
Source§fn stream(
&mut self,
) -> impl Stream<Item = Result<Self::Message, Self::Error>> + Send + '_
fn stream( &mut self, ) -> impl Stream<Item = Result<Self::Message, Self::Error>> + Send + '_
Yields one delivery per message, each with a slot in the window.
§Cancel safety
As a Pub/Sub subscription’s: a message nobody is polling for is lost.
Source§type Message = RoundMessage<PubSubForm>
type Message = RoundMessage<PubSubForm>
Source§type Error = RedisError
type Error = RedisError
Source§impl Subscriber for PipelinedSubscriber<ListReader, ListForm>
impl Subscriber for PipelinedSubscriber<ListReader, ListForm>
Source§fn stream(
&mut self,
) -> impl Stream<Item = Result<Self::Message, Self::Error>> + Send + '_
fn stream( &mut self, ) -> impl Stream<Item = Result<Self::Message, Self::Error>> + Send + '_
Yields one delivery per entry, each with a slot in the window, claiming the read’s COUNT
at a time.
§Cancel safety
As RedisListSubscriber’s: on a reliable list an entry
claimed and not settled stays on the processing list.
Source§type Message = RoundMessage<ListForm>
type Message = RoundMessage<ListForm>
Source§type Error = RedisError
type Error = RedisError
Auto Trait Implementations§
impl<Inner, F> !RefUnwindSafe for PipelinedSubscriber<Inner, F>
impl<Inner, F> !UnwindSafe for PipelinedSubscriber<Inner, F>
impl<Inner, F> Freeze for PipelinedSubscriber<Inner, F>
impl<Inner, F> Send for PipelinedSubscriber<Inner, F>
impl<Inner, F> Sync for PipelinedSubscriber<Inner, F>
impl<Inner, F> Unpin for PipelinedSubscriber<Inner, F>
impl<Inner, F> UnsafeUnpin for PipelinedSubscriber<Inner, F>
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
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> ⓘ
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> ⓘ
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