Struct neutron::ConsumerBuilder
source · pub struct ConsumerBuilder<C, T>where
T: ConsumerDataTrait,
C: PulsarClient,{ /* private fields */ }
Implementations§
source§impl<T> ConsumerBuilder<Client, T>where
T: ConsumerDataTrait,
impl<T> ConsumerBuilder<Client, T>where
T: ConsumerDataTrait,
pub fn new() -> Self
pub fn with_consumer_name(self, consumer_name: &str) -> Self
pub fn with_topic(self, topic: &str) -> Self
pub fn with_subscription(self, subscription: &str) -> Self
pub fn add_plugin<Plugin>(self, plugin: Plugin) -> Self
pub async fn connect( self, pulsar_manager: &PulsarManager ) -> Result<Consumer<Client, T>, NeutronError>
Trait Implementations§
source§impl<T> Default for ConsumerBuilder<Client, T>where
T: ConsumerDataTrait,
impl<T> Default for ConsumerBuilder<Client, T>where
T: ConsumerDataTrait,
Auto Trait Implementations§
impl<C, T> Freeze for ConsumerBuilder<C, T>
impl<C, T> !RefUnwindSafe for ConsumerBuilder<C, T>
impl<C, T> Send for ConsumerBuilder<C, T>
impl<C, T> Sync for ConsumerBuilder<C, T>
impl<C, T> Unpin for ConsumerBuilder<C, T>
impl<C, T> !UnwindSafe for ConsumerBuilder<C, T>
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
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