Struct rdkafka::error::RDKafkaError
source · pub struct RDKafkaError(/* private fields */);
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)>
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 IsError for RDKafkaError
impl IsError for RDKafkaError
source§impl PartialEq for RDKafkaError
impl PartialEq for RDKafkaError
impl Eq for RDKafkaError
impl Send for RDKafkaError
impl Sync for RDKafkaError
Auto Trait Implementations§
impl Freeze for RDKafkaError
impl RefUnwindSafe for RDKafkaError
impl Unpin for RDKafkaError
impl UnwindSafe for RDKafkaError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.