1#[derive(std::fmt::Debug)]
5pub enum HealthcheckOperationError {
6 HealtcheckError(crate::error::HealtcheckError),
8}
9impl std::fmt::Display for HealthcheckOperationError {
10 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11 match &self {
12 HealthcheckOperationError::HealtcheckError(_inner) => _inner.fmt(f),
13 }
14 }
15}
16impl HealthcheckOperationError {
17 pub fn is_healtcheck_error(&self) -> bool {
19 matches!(&self, HealthcheckOperationError::HealtcheckError(_))
20 }
21 pub fn name(&self) -> &'static str {
23 match &self {
24 HealthcheckOperationError::HealtcheckError(_inner) => _inner.name(),
25 }
26 }
27}
28impl std::error::Error for HealthcheckOperationError {
29 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
30 match &self {
31 HealthcheckOperationError::HealtcheckError(_inner) => Some(_inner),
32 }
33 }
34}
35
36#[derive(std::fmt::Debug)]
39pub enum PrometheusTargetOperationError {
40 DocktorError(crate::error::DocktorError),
42 PrometheusError(crate::error::PrometheusError),
44}
45impl std::fmt::Display for PrometheusTargetOperationError {
46 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
47 match &self {
48 PrometheusTargetOperationError::DocktorError(_inner) => _inner.fmt(f),
49 PrometheusTargetOperationError::PrometheusError(_inner) => _inner.fmt(f),
50 }
51 }
52}
53impl PrometheusTargetOperationError {
54 pub fn is_docktor_error(&self) -> bool {
56 matches!(&self, PrometheusTargetOperationError::DocktorError(_))
57 }
58 pub fn is_prometheus_error(&self) -> bool {
60 matches!(&self, PrometheusTargetOperationError::PrometheusError(_))
61 }
62 pub fn name(&self) -> &'static str {
64 match &self {
65 PrometheusTargetOperationError::DocktorError(_inner) => _inner.name(),
66 PrometheusTargetOperationError::PrometheusError(_inner) => _inner.name(),
67 }
68 }
69}
70impl std::error::Error for PrometheusTargetOperationError {
71 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
72 match &self {
73 PrometheusTargetOperationError::DocktorError(_inner) => Some(_inner),
74 PrometheusTargetOperationError::PrometheusError(_inner) => Some(_inner),
75 }
76 }
77}
78
79#[derive(std::fmt::Debug)]
82pub enum RestartOperationError {
83 DocktorError(crate::error::DocktorError),
85 SystemdError(crate::error::SystemdError),
87}
88impl std::fmt::Display for RestartOperationError {
89 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
90 match &self {
91 RestartOperationError::DocktorError(_inner) => _inner.fmt(f),
92 RestartOperationError::SystemdError(_inner) => _inner.fmt(f),
93 }
94 }
95}
96impl RestartOperationError {
97 pub fn is_docktor_error(&self) -> bool {
99 matches!(&self, RestartOperationError::DocktorError(_))
100 }
101 pub fn is_systemd_error(&self) -> bool {
103 matches!(&self, RestartOperationError::SystemdError(_))
104 }
105 pub fn name(&self) -> &'static str {
107 match &self {
108 RestartOperationError::DocktorError(_inner) => _inner.name(),
109 RestartOperationError::SystemdError(_inner) => _inner.name(),
110 }
111 }
112}
113impl std::error::Error for RestartOperationError {
114 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
115 match &self {
116 RestartOperationError::DocktorError(_inner) => Some(_inner),
117 RestartOperationError::SystemdError(_inner) => Some(_inner),
118 }
119 }
120}
121
122#[derive(std::fmt::Debug)]
125pub enum StartOperationError {
126 DocktorError(crate::error::DocktorError),
128 SystemdError(crate::error::SystemdError),
130}
131impl std::fmt::Display for StartOperationError {
132 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
133 match &self {
134 StartOperationError::DocktorError(_inner) => _inner.fmt(f),
135 StartOperationError::SystemdError(_inner) => _inner.fmt(f),
136 }
137 }
138}
139impl StartOperationError {
140 pub fn is_docktor_error(&self) -> bool {
142 matches!(&self, StartOperationError::DocktorError(_))
143 }
144 pub fn is_systemd_error(&self) -> bool {
146 matches!(&self, StartOperationError::SystemdError(_))
147 }
148 pub fn name(&self) -> &'static str {
150 match &self {
151 StartOperationError::DocktorError(_inner) => _inner.name(),
152 StartOperationError::SystemdError(_inner) => _inner.name(),
153 }
154 }
155}
156impl std::error::Error for StartOperationError {
157 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
158 match &self {
159 StartOperationError::DocktorError(_inner) => Some(_inner),
160 StartOperationError::SystemdError(_inner) => Some(_inner),
161 }
162 }
163}
164
165#[derive(std::fmt::Debug)]
168pub enum StopOperationError {
169 DocktorError(crate::error::DocktorError),
171 SystemdError(crate::error::SystemdError),
173}
174impl std::fmt::Display for StopOperationError {
175 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
176 match &self {
177 StopOperationError::DocktorError(_inner) => _inner.fmt(f),
178 StopOperationError::SystemdError(_inner) => _inner.fmt(f),
179 }
180 }
181}
182impl StopOperationError {
183 pub fn is_docktor_error(&self) -> bool {
185 matches!(&self, StopOperationError::DocktorError(_))
186 }
187 pub fn is_systemd_error(&self) -> bool {
189 matches!(&self, StopOperationError::SystemdError(_))
190 }
191 pub fn name(&self) -> &'static str {
193 match &self {
194 StopOperationError::DocktorError(_inner) => _inner.name(),
195 StopOperationError::SystemdError(_inner) => _inner.name(),
196 }
197 }
198}
199impl std::error::Error for StopOperationError {
200 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
201 match &self {
202 StopOperationError::DocktorError(_inner) => Some(_inner),
203 StopOperationError::SystemdError(_inner) => Some(_inner),
204 }
205 }
206}
207
208#[non_exhaustive]
210#[derive(std::clone::Clone, std::cmp::PartialEq)]
211pub struct PrometheusError {
212 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
214}
215impl std::fmt::Debug for PrometheusError {
216 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
217 let mut formatter = f.debug_struct("PrometheusError");
218 formatter.field("message", &self.message);
219 formatter.finish()
220 }
221}
222impl PrometheusError {
223 pub fn message(&self) -> Option<&str> {
225 self.message.as_deref()
226 }
227 #[doc(hidden)]
228 pub fn name(&self) -> &'static str {
230 "PrometheusError"
231 }
232}
233impl std::fmt::Display for PrometheusError {
234 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
235 write!(f, "PrometheusError")?;
236 if let Some(inner_1) = &self.message {
237 write!(f, ": {}", inner_1)?;
238 }
239 Ok(())
240 }
241}
242impl std::error::Error for PrometheusError {}
243pub mod prometheus_error {
245 #[non_exhaustive]
247 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
248 pub struct Builder {
249 pub(crate) message: std::option::Option<std::string::String>,
250 }
251 impl Builder {
252 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
254 self.message = Some(input.into());
255 self
256 }
257 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
259 self.message = input;
260 self
261 }
262 pub fn build(self) -> crate::error::PrometheusError {
264 crate::error::PrometheusError {
265 message: self.message,
266 }
267 }
268 }
269}
270impl PrometheusError {
271 pub fn builder() -> crate::error::prometheus_error::Builder {
273 crate::error::prometheus_error::Builder::default()
274 }
275}
276
277#[non_exhaustive]
279#[derive(std::clone::Clone, std::cmp::PartialEq)]
280pub struct DocktorError {
281 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
283}
284impl std::fmt::Debug for DocktorError {
285 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
286 let mut formatter = f.debug_struct("DocktorError");
287 formatter.field("message", &self.message);
288 formatter.finish()
289 }
290}
291impl DocktorError {
292 pub fn message(&self) -> Option<&str> {
294 self.message.as_deref()
295 }
296 #[doc(hidden)]
297 pub fn name(&self) -> &'static str {
299 "DocktorError"
300 }
301}
302impl std::fmt::Display for DocktorError {
303 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
304 write!(f, "DocktorError")?;
305 if let Some(inner_2) = &self.message {
306 write!(f, ": {}", inner_2)?;
307 }
308 Ok(())
309 }
310}
311impl std::error::Error for DocktorError {}
312pub mod docktor_error {
314 #[non_exhaustive]
316 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
317 pub struct Builder {
318 pub(crate) message: std::option::Option<std::string::String>,
319 }
320 impl Builder {
321 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
323 self.message = Some(input.into());
324 self
325 }
326 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
328 self.message = input;
329 self
330 }
331 pub fn build(self) -> crate::error::DocktorError {
333 crate::error::DocktorError {
334 message: self.message,
335 }
336 }
337 }
338}
339impl DocktorError {
340 pub fn builder() -> crate::error::docktor_error::Builder {
342 crate::error::docktor_error::Builder::default()
343 }
344}
345
346#[non_exhaustive]
348#[derive(std::clone::Clone, std::cmp::PartialEq)]
349pub struct SystemdError {
350 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
352}
353impl std::fmt::Debug for SystemdError {
354 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
355 let mut formatter = f.debug_struct("SystemdError");
356 formatter.field("message", &self.message);
357 formatter.finish()
358 }
359}
360impl SystemdError {
361 pub fn message(&self) -> Option<&str> {
363 self.message.as_deref()
364 }
365 #[doc(hidden)]
366 pub fn name(&self) -> &'static str {
368 "SystemdError"
369 }
370}
371impl std::fmt::Display for SystemdError {
372 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
373 write!(f, "SystemdError")?;
374 if let Some(inner_3) = &self.message {
375 write!(f, ": {}", inner_3)?;
376 }
377 Ok(())
378 }
379}
380impl std::error::Error for SystemdError {}
381pub mod systemd_error {
383 #[non_exhaustive]
385 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
386 pub struct Builder {
387 pub(crate) message: std::option::Option<std::string::String>,
388 }
389 impl Builder {
390 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
392 self.message = Some(input.into());
393 self
394 }
395 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
397 self.message = input;
398 self
399 }
400 pub fn build(self) -> crate::error::SystemdError {
402 crate::error::SystemdError {
403 message: self.message,
404 }
405 }
406 }
407}
408impl SystemdError {
409 pub fn builder() -> crate::error::systemd_error::Builder {
411 crate::error::systemd_error::Builder::default()
412 }
413}
414
415#[non_exhaustive]
417#[derive(std::clone::Clone, std::cmp::PartialEq)]
418pub struct HealtcheckError {
419 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
421}
422impl std::fmt::Debug for HealtcheckError {
423 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
424 let mut formatter = f.debug_struct("HealtcheckError");
425 formatter.field("message", &self.message);
426 formatter.finish()
427 }
428}
429impl HealtcheckError {
430 pub fn message(&self) -> Option<&str> {
432 self.message.as_deref()
433 }
434 #[doc(hidden)]
435 pub fn name(&self) -> &'static str {
437 "HealtcheckError"
438 }
439}
440impl std::fmt::Display for HealtcheckError {
441 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
442 write!(f, "HealtcheckError")?;
443 if let Some(inner_4) = &self.message {
444 write!(f, ": {}", inner_4)?;
445 }
446 Ok(())
447 }
448}
449impl std::error::Error for HealtcheckError {}
450pub mod healtcheck_error {
452 #[non_exhaustive]
454 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
455 pub struct Builder {
456 pub(crate) message: std::option::Option<std::string::String>,
457 }
458 impl Builder {
459 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
461 self.message = Some(input.into());
462 self
463 }
464 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
466 self.message = input;
467 self
468 }
469 pub fn build(self) -> crate::error::HealtcheckError {
471 crate::error::HealtcheckError {
472 message: self.message,
473 }
474 }
475 }
476}
477impl HealtcheckError {
478 pub fn builder() -> crate::error::healtcheck_error::Builder {
480 crate::error::healtcheck_error::Builder::default()
481 }
482}