Struct rdkafka::config::ClientConfig
source · [−]pub struct ClientConfig {
pub log_level: RDKafkaLogLevel,
/* private fields */
}
Expand description
Client configuration.
Fields
log_level: RDKafkaLogLevel
The librdkafka logging level. Refer to RDKafkaLogLevel
for the list
of available levels.
Implementations
Creates a new empty configuration.
Gets the value of a parameter in the configuration.
Returns the current value set for key
, or None
if no value for key
exists.
Note that this method will only ever return values that were installed
by a call to ClientConfig::set
. To retrieve librdkafka’s default
value for a parameter, build a NativeClientConfig
and then call
NativeClientConfig::get
on the resulting object.
Sets a parameter in the configuration.
If there is an existing value for key
in the configuration, it is
overridden with the new value
.
Removes a parameter from the configuration.
Sets the log level of the client. If not specified, the log level will be calculated based on the global log level of the log crate.
Builds a native librdkafka configuration.
Uses the current configuration to create a new Consumer or Producer.
pub fn create_with_context<C, T>(&self, context: C) -> KafkaResult<T> where
C: ClientContext,
T: FromClientConfigAndContext<C>,
pub fn create_with_context<C, T>(&self, context: C) -> KafkaResult<T> where
C: ClientContext,
T: FromClientConfigAndContext<C>,
Uses the current configuration and the provided context to create a new Consumer or Producer.
Trait Implementations
Extends a collection with the contents of an iterator. Read more
extend_one
)Extends a collection with exactly one element.
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Creates a value from an iterator. Read more
Auto Trait Implementations
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnwindSafe for ClientConfig
Blanket Implementations
Mutably borrows from an owned value. Read more