Skip to main content

Module error

Module error 

Source
Expand description

Error and result types returned by this crate. Error types returned by Kafkit.

Most applications can use Result directly and match on crate::Error only when they need to handle a specific category.

use kafkit_client::{Error, KafkaClient};

let admin = KafkaClient::new("localhost:9092").admin().connect().await?;
if let Err(Error::Admin(error)) = admin.create_topics(Vec::<kafkit_client::NewTopic>::new()).await {
    eprintln!("admin request failed: {error}");
}

Enums§

AdminError
Errors raised before or during admin operations.
ConsumerError
Errors raised by the consumer API.
ConsumerGroupMetadataError
Errors found while validating consumer group metadata.
Error
Top-level error returned by the crate.
ProducerError
Errors raised by the producer API.
TransactionStateError
Errors raised by the producer transaction state machine.

Type Aliases§

Result
Result type used by the client APIs.