1 2 3 4 5 6 7 8 9 10 11 12 13 14
use crate::clients::ClientError; use thiserror::Error; pub type Result<T> = std::result::Result<T, ProducerError>; #[derive(Debug, Error)] pub enum ProducerError { // #[error("IO error: {0}")] // Io(#[from] std::io::Error), // #[error("Protocol error: {0}")] // Format(#[from] FormatError), #[error("Client error: {0}")] Client(#[from] ClientError), }