pub enum BrokerError {
Response {
operation: &'static str,
resource: String,
code: i16,
name: String,
retriable: bool,
fatal: bool,
transaction_abort_required: bool,
},
}Expand description
Kafka broker error returned in a response payload.
Variants§
Implementations§
Source§impl BrokerError
impl BrokerError
Sourcepub fn response(
operation: &'static str,
resource: impl Into<Option<String>>,
error: ResponseError,
) -> Self
pub fn response( operation: &'static str, resource: impl Into<Option<String>>, error: ResponseError, ) -> Self
Builds a broker-response error from a Kafka protocol error.
Sourcepub fn fatal(self) -> Self
pub fn fatal(self) -> Self
Marks this broker error as fatal to the current client or transaction.
Sourcepub fn transaction_abort_required(self) -> Self
pub fn transaction_abort_required(self) -> Self
Marks this broker error as requiring transaction abort before reuse.
Trait Implementations§
Source§impl Clone for BrokerError
impl Clone for BrokerError
Source§fn clone(&self) -> BrokerError
fn clone(&self) -> BrokerError
Returns a duplicate 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 BrokerError
impl Debug for BrokerError
Source§impl Display for BrokerError
impl Display for BrokerError
Source§impl Error for BrokerError
impl Error for BrokerError
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 From<BrokerError> for Error
impl From<BrokerError> for Error
Source§fn from(source: BrokerError) -> Self
fn from(source: BrokerError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BrokerError
impl RefUnwindSafe for BrokerError
impl Send for BrokerError
impl Sync for BrokerError
impl Unpin for BrokerError
impl UnsafeUnpin for BrokerError
impl UnwindSafe for BrokerError
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