pub struct ProducerBuilder<T> {
pub batch_size: usize,
pub filter_value_extractor: Option<Arc<dyn Fn(&Message) -> String + Send + Sync + 'static>>,
/* private fields */
}
Expand description
Builder for Producer
Fields§
§batch_size: usize
§filter_value_extractor: Option<Arc<dyn Fn(&Message) -> String + Send + Sync + 'static>>
Implementations§
Source§impl<T> ProducerBuilder<T>
impl<T> ProducerBuilder<T>
pub async fn build( self, stream: &str, ) -> Result<Producer<T>, ProducerCreateError>
pub fn on_closed( self, on_closed: Box<dyn OnClosed + Send + Sync>, ) -> ProducerBuilder<T>
pub fn batch_size(self, batch_size: usize) -> Self
Sourcepub fn overwrite_heartbeat(self, heartbeat: u32) -> ProducerBuilder<T>
pub fn overwrite_heartbeat(self, heartbeat: u32) -> ProducerBuilder<T>
Don’t use this in production, it is only for testing purposes.
pub fn client_provided_name(self, name: &str) -> Self
pub fn name(self, name: &str) -> ProducerBuilder<Dedup>
pub fn filter_value_extractor( self, filter_value_extractor: impl Fn(&Message) -> String + Send + Sync + 'static, ) -> Self
pub fn filter_value_extractor_arc( self, filter_value_extractor: Option<Arc<dyn Fn(&Message) -> String + Send + Sync + 'static>>, ) -> Self
Auto Trait Implementations§
impl<T> Freeze for ProducerBuilder<T>
impl<T> !RefUnwindSafe for ProducerBuilder<T>
impl<T> Send for ProducerBuilder<T>where
T: Send,
impl<T> Sync for ProducerBuilder<T>where
T: Sync,
impl<T> Unpin for ProducerBuilder<T>where
T: Unpin,
impl<T> !UnwindSafe for ProducerBuilder<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