pub enum ClientApiError {
Network {
code: u32,
kind: NetworkErrorType,
message: String,
retry_after_ms: Option<u64>,
leader_hint: Option<LeaderInfo>,
},
Protocol {
code: u32,
kind: ProtocolErrorType,
message: String,
supported_versions: Option<Vec<String>>,
},
Storage {
code: u32,
kind: StorageErrorType,
message: String,
},
Business {
code: u32,
kind: BusinessErrorType,
message: String,
required_action: Option<String>,
},
General {
code: u32,
kind: GeneralErrorType,
message: String,
required_action: Option<String>,
},
}
Variants§
Network
Network layer error (retryable)
Protocol
Protocol layer error (client needs to check protocol compatibility)
Storage
Storage layer error (internal problem on the server)
Business
Business logic error (client needs to adjust behavior)
General
General Client API error
Implementations§
Source§impl ClientApiError
impl ClientApiError
pub fn general_client_error(message: String) -> Self
Trait Implementations§
Source§impl Clone for ClientApiError
impl Clone for ClientApiError
Source§fn clone(&self) -> ClientApiError
fn clone(&self) -> ClientApiError
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 ClientApiError
impl Debug for ClientApiError
Source§impl<'de> Deserialize<'de> for ClientApiError
impl<'de> Deserialize<'de> for ClientApiError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Error> for ClientApiError
impl From<Error> for ClientApiError
Source§impl From<Error> for ClientApiError
impl From<Error> for ClientApiError
Source§impl From<ErrorCode> for ClientApiError
impl From<ErrorCode> for ClientApiError
Source§impl From<JoinError> for ClientApiError
impl From<JoinError> for ClientApiError
Source§impl From<Status> for ClientApiError
impl From<Status> for ClientApiError
Auto Trait Implementations§
impl Freeze for ClientApiError
impl RefUnwindSafe for ClientApiError
impl Send for ClientApiError
impl Sync for ClientApiError
impl Unpin for ClientApiError
impl UnwindSafe for ClientApiError
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request