pub enum CommandError {
CreationFailed {
status: u16,
body: String,
},
Timeout {
command_id: String,
last_state: String,
},
DeploymentError {
command_id: String,
code: String,
message: String,
},
Expired {
command_id: String,
},
ResponseDecodingFailed {
command_id: String,
reason: String,
},
StorageOperationFailed {
reason: String,
},
HttpError(Error),
JsonError(Error),
}Expand description
Errors that can occur when invoking commands.
Variants§
CreationFailed
Command creation failed (HTTP error from manager)
Timeout
Command timed out waiting for result
DeploymentError
Deployment returned an error
Expired
Command expired (deadline passed)
ResponseDecodingFailed
Failed to decode response
StorageOperationFailed
Storage download failed (for large responses)
HttpError(Error)
HTTP/network error
JsonError(Error)
JSON serialization/deserialization error
Implementations§
Source§impl CommandError
impl CommandError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Returns true if this error is potentially retryable.
Trait Implementations§
Source§impl Debug for CommandError
impl Debug for CommandError
Source§impl Display for CommandError
impl Display for CommandError
Source§impl Error for CommandError
impl Error for CommandError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for CommandError
impl From<Error> for CommandError
Auto Trait Implementations§
impl Freeze for CommandError
impl !RefUnwindSafe for CommandError
impl Send for CommandError
impl Sync for CommandError
impl Unpin for CommandError
impl UnsafeUnpin for CommandError
impl !UnwindSafe for CommandError
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> 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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.