pub enum ErrorKind {
TemplateRendering,
InfrastructureOperation,
NetworkConnectivity,
CommandExecution,
Timeout,
FileSystem,
Configuration,
StatePersistence,
}Expand description
Generic error categories for command failures
These categories provide high-level classification for debugging and potential recovery strategies. They are used in trace files and failure context but are not directly user-facing.
Error kinds were introduced to provide an easy way to understand what type of error occurred without parsing detailed trace log files. They serve as a high-level summary that can be:
- Displayed to users without technical details
- Used for filtering/grouping errors
- Foundation for future retry/recovery strategies based on error category
§Examples
use torrust_tracker_deployer_types::ErrorKind;
let kind = ErrorKind::TemplateRendering;
assert_eq!(format!("{kind:?}"), "TemplateRendering");Variants§
TemplateRendering
Template rendering or generation failed
Examples: Tera template errors, invalid template variables, missing template files
InfrastructureOperation
Infrastructure operations failed
Examples: OpenTofu operations (init, plan, apply), LXD operations,
container/VM management failures
NetworkConnectivity
Network connectivity or communication failed
Examples: SSH connection timeouts, unreachable hosts, network configuration issues
CommandExecution
External tool or command execution failed
Examples: Ansible playbook failures, shell command errors, tool installation failures
Timeout
Timeout or deadline exceeded
Examples: Operation timeouts, cloud-init wait exceeded, long-running process killed
FileSystem
File system or I/O operation failed
Examples: File read/write errors, permission denied, disk space issues, path not found
Configuration
Configuration validation or parsing failed
Examples: Invalid YAML/TOML, missing required fields, configuration value out of range
StatePersistence
State persistence operation failed
Examples: Failed to save environment state, repository errors, serialization/deserialization failures, storage access issues
Trait Implementations§
impl Copy for ErrorKind
Source§impl<'de> Deserialize<'de> for ErrorKind
impl<'de> Deserialize<'de> for ErrorKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ErrorKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ErrorKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ErrorKind
Source§impl Serialize for ErrorKind
impl Serialize for ErrorKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
impl UnwindSafe for ErrorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<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
key and return true if they are equal.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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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>
T in a tonic::Request