Struct rdkafka::error::RDKafkaError
source · pub struct RDKafkaError(_);
Expand description
Native rdkafka error.
Implementations§
source§impl RDKafkaError
impl RDKafkaError
sourcepub fn code(&self) -> RDKafkaErrorCode
pub fn code(&self) -> RDKafkaErrorCode
Returns the error code or RDKafkaErrorCode::NoError
if the error is
null.
sourcepub fn name(&self) -> String
pub fn name(&self) -> String
Returns the error code name, e.g., “ERR_UNKNOWN_MEMBER_ID” or an empty string if the error is null.
sourcepub fn string(&self) -> String
pub fn string(&self) -> String
Returns a human readable error string or an empty string if the error is null.
sourcepub fn is_fatal(&self) -> bool
pub fn is_fatal(&self) -> bool
Reports whether the error is a fatal error.
A fatal error indicates that the client instance is no longer usable.
sourcepub fn is_retriable(&self) -> bool
pub fn is_retriable(&self) -> bool
Reports whether the operation that encountered the error can be retried.
sourcepub fn txn_requires_abort(&self) -> bool
pub fn txn_requires_abort(&self) -> bool
Reports whether the error is an abortable transaction error.
Trait Implementations§
source§impl Clone for RDKafkaError
impl Clone for RDKafkaError
source§fn clone(&self) -> RDKafkaError
fn clone(&self) -> RDKafkaError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RDKafkaError
impl Debug for RDKafkaError
source§impl Display for RDKafkaError
impl Display for RDKafkaError
source§impl Error for RDKafkaError
impl Error for RDKafkaError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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 IsError for RDKafkaError
impl IsError for RDKafkaError
source§impl PartialEq<RDKafkaError> for RDKafkaError
impl PartialEq<RDKafkaError> for RDKafkaError
source§fn eq(&self, other: &RDKafkaError) -> bool
fn eq(&self, other: &RDKafkaError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for RDKafkaError
impl Send for RDKafkaError
impl Sync for RDKafkaError
Auto Trait Implementations§
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.