Skip to main content

PipelinedSubscriber

Struct PipelinedSubscriber 

Source
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>

Source§

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>>

Container yielded by batches. Implementations choose between Vec, custom iterators, or anything else that yields the underlying Subscriber::Message.
Source§

impl BatchSubscriber for PipelinedSubscriber<ChannelReader, PubSubForm>

Source§

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>>

Container yielded by batches. Implementations choose between Vec, custom iterators, or anything else that yields the underlying Subscriber::Message.
Source§

impl BatchSubscriber for PipelinedSubscriber<ListReader, ListForm>

Source§

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>>

Container yielded by 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>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Inner, F: Form> Drop for PipelinedSubscriber<Inner, F>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
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.

Source§

type Seeker = RedisGroupSeeker

The handle usable while this subscriber’s stream is running.
Source§

fn seeker(&self) -> RedisGroupSeeker

Mints a handle for repositioning this subscription.
Source§

impl Subscriber for PipelinedSubscriber<RedisSubscriber, StreamForm>

Source§

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>

The message type yielded by this subscriber.
Source§

type Error = RedisError

The error type yielded by the stream when delivery fails.
Source§

impl Subscriber for PipelinedSubscriber<ChannelReader, PubSubForm>

Source§

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>

The message type yielded by this subscriber.
Source§

type Error = RedisError

The error type yielded by the stream when delivery fails.
Source§

impl Subscriber for PipelinedSubscriber<ListReader, ListForm>

Source§

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>

The message type yielded by this subscriber.
Source§

type Error = RedisError

The error type yielded by the stream when delivery fails.

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>
where Inner: Freeze, Arc<Window<F>>: Freeze,

§

impl<Inner, F> Send for PipelinedSubscriber<Inner, F>
where Inner: Send, Arc<Window<F>>: Send,

§

impl<Inner, F> Sync for PipelinedSubscriber<Inner, F>
where Inner: Sync, Arc<Window<F>>: Sync,

§

impl<Inner, F> Unpin for PipelinedSubscriber<Inner, F>
where Inner: Unpin, Arc<Window<F>>: Unpin,

§

impl<Inner, F> UnsafeUnpin for PipelinedSubscriber<Inner, F>
where Inner: UnsafeUnpin, Arc<Window<F>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> PublishedThrough<DefaultSlot> for T

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more