pub struct DefaultClientContext;
Expand description
An empty ClientContext
that can be used when no customizations are
needed.
Uses the default callback implementations provided by ClientContext
.
Trait Implementations§
Source§impl ClientContext for DefaultClientContext
impl ClientContext for DefaultClientContext
Source§const ENABLE_REFRESH_OAUTH_TOKEN: bool = false
const ENABLE_REFRESH_OAUTH_TOKEN: bool = false
Whether to periodically refresh the SASL
OAUTHBEARER
token
by calling ClientContext::generate_oauth_token
. Read moreSource§fn log(&self, level: RDKafkaLogLevel, fac: &str, log_message: &str)
fn log(&self, level: RDKafkaLogLevel, fac: &str, log_message: &str)
Receives log lines from librdkafka. Read more
Source§fn stats(&self, statistics: Statistics)
fn stats(&self, statistics: Statistics)
Receives the decoded statistics of the librdkafka client. To enable, the
statistics.interval.ms
configuration parameter must be specified. Read moreSource§fn stats_raw(&self, statistics: &[u8])
fn stats_raw(&self, statistics: &[u8])
Receives the JSON-encoded statistics of the librdkafka client. To
enable, the
statistics.interval.ms
configuration parameter must be
specified. Read moreSource§fn error(&self, error: KafkaError, reason: &str)
fn error(&self, error: KafkaError, reason: &str)
Receives global errors from the librdkafka client. Read more
Source§fn resolve_broker_addr(
&self,
host: &str,
port: u16,
) -> Result<Vec<SocketAddr>, Error>
fn resolve_broker_addr( &self, host: &str, port: u16, ) -> Result<Vec<SocketAddr>, Error>
Performs DNS resolution on a broker address. Read more
Source§fn generate_oauth_token(
&self,
_oauthbearer_config: Option<&str>,
) -> Result<OAuthToken, Box<dyn Error>>
fn generate_oauth_token( &self, _oauthbearer_config: Option<&str>, ) -> Result<OAuthToken, Box<dyn Error>>
Generates an OAuth token from the provided configuration. Read more
Source§impl Clone for DefaultClientContext
impl Clone for DefaultClientContext
Source§fn clone(&self) -> DefaultClientContext
fn clone(&self) -> DefaultClientContext
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 moreSource§impl Debug for DefaultClientContext
impl Debug for DefaultClientContext
Source§impl Default for DefaultClientContext
impl Default for DefaultClientContext
Source§fn default() -> DefaultClientContext
fn default() -> DefaultClientContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DefaultClientContext
impl RefUnwindSafe for DefaultClientContext
impl Send for DefaultClientContext
impl Sync for DefaultClientContext
impl Unpin for DefaultClientContext
impl UnwindSafe for DefaultClientContext
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)