pub struct ApiError { /* private fields */ }Expand description
Java org.apache.kafka.common.requests.ApiError.
Self::NONE is code NONE with a null message. Self::from_code
is Java ApiError(short, String): unknown codes become
UNKNOWN_SERVER_ERROR (Java Errors.forCode). std::fmt::Display is Java
ApiError.toString (ApiError(error=NONE, message=null)).
Implementations§
Source§impl ApiError
impl ApiError
Sourcepub fn from_code(code: i16, message: Option<String>) -> Self
pub fn from_code(code: i16, message: Option<String>) -> Self
Java ApiError(short, String).
Unknown codes become UNKNOWN_SERVER_ERROR.
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Java ApiError.isSuccess.
Sourcepub fn is_failure(&self) -> bool
pub fn is_failure(&self) -> bool
Java ApiError.isFailure.
Trait Implementations§
impl Eq for ApiError
impl StructuralPartialEq for ApiError
Auto Trait Implementations§
impl Freeze for ApiError
impl RefUnwindSafe for ApiError
impl Send for ApiError
impl Sync for ApiError
impl Unpin for ApiError
impl UnsafeUnpin for ApiError
impl UnwindSafe for ApiError
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