pub struct ConsumerBuilder { /* private fields */ }
Expand description
A non-consuming Consumer builder.
Implementations§
Source§impl ConsumerBuilder
impl ConsumerBuilder
pub fn new(conn: Connection) -> Self
Sourcepub fn with_processor(
&mut self,
processor: Box<dyn MessageProcess + Send + Sync>,
) -> &mut Self
pub fn with_processor( &mut self, processor: Box<dyn MessageProcess + Send + Sync>, ) -> &mut Self
Use the provided MessageProcess trait object.
pub async fn build(&self) -> Result<Consumer, Error>
Trait Implementations§
Source§impl Clone for ConsumerBuilder
impl Clone for ConsumerBuilder
Source§fn clone(&self) -> ConsumerBuilder
fn clone(&self) -> ConsumerBuilder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ConsumerBuilder
impl !RefUnwindSafe for ConsumerBuilder
impl Send for ConsumerBuilder
impl Sync for ConsumerBuilder
impl Unpin for ConsumerBuilder
impl !UnwindSafe for ConsumerBuilder
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