pub struct ProducerOptiopns<'a> { /* private fields */ }Expand description
Configuration options for the producer
Implementations§
Source§impl<'a> ProducerOptiopns<'a>
impl<'a> ProducerOptiopns<'a>
Sourcepub fn from(
bootstrap_servers: String,
message_timeout_ms: String,
queue_timeout_secs: u64,
other_options: HashMap<&'a str, &'a str>,
) -> Self
pub fn from( bootstrap_servers: String, message_timeout_ms: String, queue_timeout_secs: u64, other_options: HashMap<&'a str, &'a str>, ) -> Self
Creates a new ConsumerOptiopns
§Arguments
bootstrap_servers- Comma separated bootstrap serversmessage_timeout_ms- Message timeout in millisecondsqueue_timeout_secs- Queue timeout in secondsother_options- A HashMap that holds other options that should be used to create the consumer
§Example
use simple_kafka::ProducerOptiopns;
let consumer_options = ProducerOptiopns::from("localhost:9092".to_string(), "5000".to_string(),5 HashMap::new());Auto Trait Implementations§
impl<'a> Freeze for ProducerOptiopns<'a>
impl<'a> RefUnwindSafe for ProducerOptiopns<'a>
impl<'a> Send for ProducerOptiopns<'a>
impl<'a> Sync for ProducerOptiopns<'a>
impl<'a> Unpin for ProducerOptiopns<'a>
impl<'a> UnwindSafe for ProducerOptiopns<'a>
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