pub struct PulsarSubscriber { /* private fields */ }Expand description
A subscription to one or more Pulsar topics; yields PulsarMessages, one at a time or in
batches.
Dropping the subscriber stops the driver task, which closes the client consumer.
Implementations§
Trait Implementations§
Source§impl BatchSubscriber for PulsarSubscriber
Batches assembled on the client: the client’s consumer yields one delivery at a time, and its
batch_size is a flow-control window rather than a receive size, so the buffer in front of the
consumer cuts the batches to the size the registration names.
impl BatchSubscriber for PulsarSubscriber
Batches assembled on the client: the client’s consumer yields one delivery at a time, and its
batch_size is a flow-control window rather than a receive size, so the buffer in front of the
consumer cuts the batches to the size the registration names.
A batch never carries more than the size the registration named - the buffer closes it there - and it carries fewer whenever the deadline elapsed first.
Source§type Batch = Vec<PulsarMessage>
type Batch = Vec<PulsarMessage>
batches. Implementations choose between Vec, custom
iterators, or anything else that yields the underlying Subscriber::Message.Source§fn batches(
&mut self,
size: NonZeroUsize,
) -> impl Stream<Item = Result<Self::Batch, PulsarError>> + Send + '_
fn batches( &mut self, size: NonZeroUsize, ) -> impl Stream<Item = Result<Self::Batch, PulsarError>> + Send + '_
size messages. Read moreSource§impl Debug for PulsarSubscriber
impl Debug for PulsarSubscriber
Source§impl Seekable for PulsarSubscriber
Buffering does not move the subscription, so the handle is the wire subscriber’s own: a batch
subscription still opens at a chosen position and still repositions from a handler.
impl Seekable for PulsarSubscriber
Buffering does not move the subscription, so the handle is the wire subscriber’s own: a batch subscription still opens at a chosen position and still repositions from a handler.
Source§type Seeker = PulsarSeeker
type Seeker = PulsarSeeker
Source§fn seeker(&self) -> PulsarSeeker
fn seeker(&self) -> PulsarSeeker
Source§impl Subscriber for PulsarSubscriber
impl Subscriber for PulsarSubscriber
Source§type Message = PulsarMessage
type Message = PulsarMessage
Source§type Error = PulsarError
type Error = PulsarError
Source§fn stream(
&mut self,
) -> impl Stream<Item = Result<PulsarMessage, PulsarError>> + Send + '_
fn stream( &mut self, ) -> impl Stream<Item = Result<PulsarMessage, PulsarError>> + Send + '_
Auto Trait Implementations§
impl Freeze for PulsarSubscriber
impl RefUnwindSafe for PulsarSubscriber
impl Send for PulsarSubscriber
impl Sync for PulsarSubscriber
impl Unpin for PulsarSubscriber
impl UnsafeUnpin for PulsarSubscriber
impl UnwindSafe for PulsarSubscriber
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