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.

Uses the current configuration and the provided context to create a new Consumer or Producer.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Extends a collection with the contents of an iterator. Read more

🔬 This is a nightly-only experimental API. (extend_one)

Extends a collection with exactly one element.

🔬 This is a nightly-only experimental API. (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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.