pub struct KafkaHookOptions {
pub urls: Option<String>,
pub client_id: Option<String>,
pub required_acks: Option<String>,
pub compression: Option<String>,
pub idle_timeout: Option<u64>,
pub send_timeout: Option<u64>,
pub extra_kafka_opts: HashMap<String, String>,
pub topic_or_prefix: Option<TopicOrPrefix>,
}Fields§
§urls: Option<String>/ Kafka urls.
/ List of brokers to connect to in the format host:port.
/ If you have multiple brokers, separate them with commas.
/ Corresponds to bootstrap.servers in Kafka configuration.
client_id: Option<String>/ Kafka producer client.id.
required_acks: Option<String>/ Kafka required acks.
compression: Option<String>/ Compression codec.
idle_timeout: Option<u64>/ Kafka idle timeout in seconds.
send_timeout: Option<u64>/ Kafka send timeout in seconds.
extra_kafka_opts: HashMap<String, String>/ Extra options for Kafka. / In Rust this is ExtraKafkaOptions; here it’s a map of strings.
topic_or_prefix: Option<TopicOrPrefix>Mutual exclusion: topic OR prefix (Rust validate enforces this).
Implementations§
Source§impl KafkaHookOptions
impl KafkaHookOptions
Sourcepub fn client_id(&self) -> &str
pub fn client_id(&self) -> &str
Returns the value of client_id, or the default value if client_id is unset.
Sourcepub fn required_acks(&self) -> &str
pub fn required_acks(&self) -> &str
Returns the value of required_acks, or the default value if required_acks is unset.
Sourcepub fn compression(&self) -> &str
pub fn compression(&self) -> &str
Returns the value of compression, or the default value if compression is unset.
Sourcepub fn idle_timeout(&self) -> u64
pub fn idle_timeout(&self) -> u64
Returns the value of idle_timeout, or the default value if idle_timeout is unset.
Sourcepub fn send_timeout(&self) -> u64
pub fn send_timeout(&self) -> u64
Returns the value of send_timeout, or the default value if send_timeout is unset.
Trait Implementations§
Source§impl Clone for KafkaHookOptions
impl Clone for KafkaHookOptions
Source§fn clone(&self) -> KafkaHookOptions
fn clone(&self) -> KafkaHookOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KafkaHookOptions
impl Debug for KafkaHookOptions
Source§impl Default for KafkaHookOptions
impl Default for KafkaHookOptions
Source§impl<'de> Deserialize<'de> for KafkaHookOptions
impl<'de> Deserialize<'de> for KafkaHookOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Message for KafkaHookOptions
impl Message for KafkaHookOptions
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for KafkaHookOptions
impl PartialEq for KafkaHookOptions
Source§impl Serialize for KafkaHookOptions
impl Serialize for KafkaHookOptions
impl StructuralPartialEq for KafkaHookOptions
Auto Trait Implementations§
impl Freeze for KafkaHookOptions
impl RefUnwindSafe for KafkaHookOptions
impl Send for KafkaHookOptions
impl Sync for KafkaHookOptions
impl Unpin for KafkaHookOptions
impl UnwindSafe for KafkaHookOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request