#[repr(i32)]pub enum ErrorCode {
Show 22 variants
Success = 0,
ConnectionTimeout = 1_001,
InvalidAddress = 1_002,
LeaderChanged = 1_003,
JoinError = 1_004,
InvalidResponse = 2_001,
VersionMismatch = 2_002,
DiskFull = 3_001,
DataCorruption = 3_002,
StorageIoError = 3_003,
StoragePermissionDenied = 3_004,
KeyNotExist = 3_005,
NotLeader = 4_001,
StaleOperation = 4_002,
InvalidRequest = 4_003,
RateLimited = 4_004,
ClusterUnavailable = 4_005,
ProposeFailed = 4_006,
TermOutdated = 4_007,
RetryRequired = 4_008,
General = 8_888,
Uncategorized = 9_999,
}
Variants§
Success = 0
Success status (non-error)
ConnectionTimeout = 1_001
§====================== Network layer error (1000-1999)
InvalidAddress = 1_002
LeaderChanged = 1_003
JoinError = 1_004
InvalidResponse = 2_001
§====================== Protocol layer error (2000-2999)
VersionMismatch = 2_002
DiskFull = 3_001
§====================== Storage layer error (3000-3999)
DataCorruption = 3_002
StorageIoError = 3_003
StoragePermissionDenied = 3_004
KeyNotExist = 3_005
NotLeader = 4_001
§====================== Business logic error (4000-4999)
StaleOperation = 4_002
InvalidRequest = 4_003
RateLimited = 4_004
ProposeFailed = 4_006
TermOutdated = 4_007
RetryRequired = 4_008
General = 8_888
§====================== Unclassified error
Uncategorized = 9_999
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ErrorCode
impl<'de> Deserialize<'de> for ErrorCode
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<ErrorCode> for ClientApiError
impl From<ErrorCode> for ClientApiError
Source§impl Ord for ErrorCode
impl Ord for ErrorCode
Source§impl PartialOrd for ErrorCode
impl PartialOrd for ErrorCode
impl Copy for ErrorCode
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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.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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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