pub struct ApiError {
pub cause: Option<String>,
pub error_code: u64,
pub index: u64,
pub message: String,
}
Expand description
An error returned by an etcd API endpoint.
This is a logical error, as opposed to other types of errors that may occur when using this
crate, such as network or serialization errors. See Error
for the other types of errors.
Fields§
§cause: Option<String>
The key that was being operated upon or reason for the failure.
error_code: u64
The etcd error code.
index: u64
The etcd index.
message: String
A human-friendly description of the error.
Trait Implementations§
source§impl<'de> Deserialize<'de> for ApiError
impl<'de> Deserialize<'de> for ApiError
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 Error for ApiError
impl Error for ApiError
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
impl Eq for ApiError
impl StructuralEq for ApiError
impl StructuralPartialEq for ApiError
Auto Trait Implementations§
impl RefUnwindSafe for ApiError
impl Send for ApiError
impl Sync for ApiError
impl Unpin for ApiError
impl UnwindSafe for ApiError
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.