cloud_sdk/client/
error.rs1use core::fmt;
2
3use crate::operation::PreparedExecutionError;
4
5pub enum ClientExecutionError<P, T, D> {
7 Preparation(P),
9 Execution(PreparedExecutionError<T>),
11 Decode(D),
13}
14
15impl<P, T, D> fmt::Debug for ClientExecutionError<P, T, D> {
16 fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
17 formatter.write_str(match self {
18 Self::Preparation(_) => "ClientExecutionError::Preparation([redacted])",
19 Self::Execution(_) => "ClientExecutionError::Execution([redacted])",
20 Self::Decode(_) => "ClientExecutionError::Decode([redacted])",
21 })
22 }
23}
24
25impl<P, T, D> fmt::Display for ClientExecutionError<P, T, D> {
26 fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
27 formatter.write_str(match self {
28 Self::Preparation(_) => "client request preparation failed",
29 Self::Execution(_) => "client request execution failed",
30 Self::Decode(_) => "client response decoding failed",
31 })
32 }
33}
34
35impl<P, T, D> core::error::Error for ClientExecutionError<P, T, D> {}