pub enum Error {
Cancelled,
Admin(AdminError),
Consumer(ConsumerError),
Producer(ProducerError),
ConsumerGroupMetadata(ConsumerGroupMetadataError),
TransactionState(TransactionStateError),
Broker(BrokerError),
Validation(ValidationError),
Protocol(ProtocolError),
Internal(Error),
}Expand description
Top-level error returned by the crate.
Variants§
Cancelled
Operation was cancelled before it completed.
Admin(AdminError)
Admin operation failed.
Consumer(ConsumerError)
Consumer operation failed.
Producer(ProducerError)
Producer operation failed.
ConsumerGroupMetadata(ConsumerGroupMetadataError)
Consumer group metadata was invalid.
TransactionState(TransactionStateError)
Transaction state prevented the operation.
Broker(BrokerError)
A Kafka broker returned a protocol error code.
Validation(ValidationError)
Public input validation failed before a broker request was sent.
Protocol(ProtocolError)
The client could not decode or validate a Kafka protocol response.
Internal(Error)
Internal error from protocol handling, IO, or validation.
Implementations§
Source§impl Error
impl Error
Sourcepub fn classification(&self) -> ErrorClassification
pub fn classification(&self) -> ErrorClassification
Classifies this error for retry and transaction recovery decisions.
Sourcepub fn is_retriable(&self) -> bool
pub fn is_retriable(&self) -> bool
Returns whether retrying the same operation may succeed.
Sourcepub fn is_fatal(&self) -> bool
pub fn is_fatal(&self) -> bool
Returns whether the client or transaction is permanently unusable.
Sourcepub fn transaction_abort_required(&self) -> bool
pub fn transaction_abort_required(&self) -> bool
Returns whether the current transaction must be aborted before reuse.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()