pub struct RedisListSubscriber(/* private fields */);Expand description
A list-backed work-queue subscription.
A pop returns one entry, so the batches a BatchSubscriber hands out are assembled on the
client by the core’s BufferedSubscriber: it fills a batch up to the size the mount site
asked for and closes a partial one on its own deadline.
Trait Implementations§
Source§impl BatchSubscriber for RedisListSubscriber
impl BatchSubscriber for RedisListSubscriber
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 batches of at most size entries, assembled from consecutive pops.
§Cancel safety
Same as Subscriber::stream. Dropping the stream while a
batch is filling abandons the entries it holds unsettled; in reliable mode they stay on the
processing list until recovered.
Source§type Batch = Vec<RedisListMessage>
type Batch = Vec<RedisListMessage>
Container yielded by
batches. Implementations choose between Vec, custom
iterators, or anything else that yields the underlying Subscriber::Message.Source§impl Debug for RedisListSubscriber
impl Debug for RedisListSubscriber
Source§impl Subscriber for RedisListSubscriber
impl Subscriber for RedisListSubscriber
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 message per popped entry.
§Cancel safety
Dropping the returned stream between items is safe. In reliable mode an entry already moved to the processing list but not yet settled stays there until acked or recovered manually.
Source§type Message = RedisListMessage
type Message = RedisListMessage
The message type yielded by this subscriber.
Source§type Error = RedisError
type Error = RedisError
The error type yielded by the stream when delivery fails.
Auto Trait Implementations§
impl !RefUnwindSafe for RedisListSubscriber
impl !UnwindSafe for RedisListSubscriber
impl Freeze for RedisListSubscriber
impl Send for RedisListSubscriber
impl Sync for RedisListSubscriber
impl Unpin for RedisListSubscriber
impl UnsafeUnpin for RedisListSubscriber
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