pub enum Error {
Show 16 variants
ConnectionError(String),
ConfigError(String),
IoError(ErrorKind, String),
SerializationError(Error),
ProtocolError(ProtocolError),
ServerError(String),
AuthenticationFailed(String),
InvalidResponse,
ResponseTooLarge(usize, usize),
RequestTooLarge(usize, usize),
CircuitBreakerOpen(String),
PoolExhausted(String),
AllServersUnavailable,
Timeout,
TimeoutWithMessage(String),
Other(String),
}Variants§
ConnectionError(String)
ConfigError(String)
IoError(ErrorKind, String)
SerializationError(Error)
ProtocolError(ProtocolError)
ServerError(String)
AuthenticationFailed(String)
InvalidResponse
ResponseTooLarge(usize, usize)
RequestTooLarge(usize, usize)
CircuitBreakerOpen(String)
PoolExhausted(String)
Timeout
TimeoutWithMessage(String)
Other(String)
Implementations§
Source§impl Error
impl Error
Sourcepub fn is_retriable(&self) -> bool
pub fn is_retriable(&self) -> bool
Classify whether this error is retriable.
Permanent errors (not retriable) include authentication failures, configuration errors, and server-side rejections for invalid topics, producer fencing, authorization failures, etc.
Transient errors (retriable) include I/O errors, connection resets, timeouts, and generic server errors that may resolve after reconnect.
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ProtocolError> for Error
impl From<ProtocolError> for Error
Source§fn from(source: ProtocolError) -> Self
fn from(source: ProtocolError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more