#[derive(std::fmt::Debug)]
pub enum HealthcheckOperationError {
HealtcheckError(crate::error::HealtcheckError),
}
impl std::fmt::Display for HealthcheckOperationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self {
HealthcheckOperationError::HealtcheckError(_inner) => _inner.fmt(f),
}
}
}
impl HealthcheckOperationError {
pub fn is_healtcheck_error(&self) -> bool {
matches!(&self, HealthcheckOperationError::HealtcheckError(_))
}
pub fn name(&self) -> &'static str {
match &self {
HealthcheckOperationError::HealtcheckError(_inner) => _inner.name(),
}
}
}
impl std::error::Error for HealthcheckOperationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self {
HealthcheckOperationError::HealtcheckError(_inner) => Some(_inner),
}
}
}
#[derive(std::fmt::Debug)]
pub enum PrometheusTargetOperationError {
DocktorError(crate::error::DocktorError),
PrometheusError(crate::error::PrometheusError),
}
impl std::fmt::Display for PrometheusTargetOperationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self {
PrometheusTargetOperationError::DocktorError(_inner) => _inner.fmt(f),
PrometheusTargetOperationError::PrometheusError(_inner) => _inner.fmt(f),
}
}
}
impl PrometheusTargetOperationError {
pub fn is_docktor_error(&self) -> bool {
matches!(&self, PrometheusTargetOperationError::DocktorError(_))
}
pub fn is_prometheus_error(&self) -> bool {
matches!(&self, PrometheusTargetOperationError::PrometheusError(_))
}
pub fn name(&self) -> &'static str {
match &self {
PrometheusTargetOperationError::DocktorError(_inner) => _inner.name(),
PrometheusTargetOperationError::PrometheusError(_inner) => _inner.name(),
}
}
}
impl std::error::Error for PrometheusTargetOperationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self {
PrometheusTargetOperationError::DocktorError(_inner) => Some(_inner),
PrometheusTargetOperationError::PrometheusError(_inner) => Some(_inner),
}
}
}
#[derive(std::fmt::Debug)]
pub enum RestartOperationError {
DocktorError(crate::error::DocktorError),
SystemdError(crate::error::SystemdError),
}
impl std::fmt::Display for RestartOperationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self {
RestartOperationError::DocktorError(_inner) => _inner.fmt(f),
RestartOperationError::SystemdError(_inner) => _inner.fmt(f),
}
}
}
impl RestartOperationError {
pub fn is_docktor_error(&self) -> bool {
matches!(&self, RestartOperationError::DocktorError(_))
}
pub fn is_systemd_error(&self) -> bool {
matches!(&self, RestartOperationError::SystemdError(_))
}
pub fn name(&self) -> &'static str {
match &self {
RestartOperationError::DocktorError(_inner) => _inner.name(),
RestartOperationError::SystemdError(_inner) => _inner.name(),
}
}
}
impl std::error::Error for RestartOperationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self {
RestartOperationError::DocktorError(_inner) => Some(_inner),
RestartOperationError::SystemdError(_inner) => Some(_inner),
}
}
}
#[derive(std::fmt::Debug)]
pub enum StartOperationError {
DocktorError(crate::error::DocktorError),
SystemdError(crate::error::SystemdError),
}
impl std::fmt::Display for StartOperationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self {
StartOperationError::DocktorError(_inner) => _inner.fmt(f),
StartOperationError::SystemdError(_inner) => _inner.fmt(f),
}
}
}
impl StartOperationError {
pub fn is_docktor_error(&self) -> bool {
matches!(&self, StartOperationError::DocktorError(_))
}
pub fn is_systemd_error(&self) -> bool {
matches!(&self, StartOperationError::SystemdError(_))
}
pub fn name(&self) -> &'static str {
match &self {
StartOperationError::DocktorError(_inner) => _inner.name(),
StartOperationError::SystemdError(_inner) => _inner.name(),
}
}
}
impl std::error::Error for StartOperationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self {
StartOperationError::DocktorError(_inner) => Some(_inner),
StartOperationError::SystemdError(_inner) => Some(_inner),
}
}
}
#[derive(std::fmt::Debug)]
pub enum StopOperationError {
DocktorError(crate::error::DocktorError),
SystemdError(crate::error::SystemdError),
}
impl std::fmt::Display for StopOperationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self {
StopOperationError::DocktorError(_inner) => _inner.fmt(f),
StopOperationError::SystemdError(_inner) => _inner.fmt(f),
}
}
}
impl StopOperationError {
pub fn is_docktor_error(&self) -> bool {
matches!(&self, StopOperationError::DocktorError(_))
}
pub fn is_systemd_error(&self) -> bool {
matches!(&self, StopOperationError::SystemdError(_))
}
pub fn name(&self) -> &'static str {
match &self {
StopOperationError::DocktorError(_inner) => _inner.name(),
StopOperationError::SystemdError(_inner) => _inner.name(),
}
}
}
impl std::error::Error for StopOperationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self {
StopOperationError::DocktorError(_inner) => Some(_inner),
StopOperationError::SystemdError(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PrometheusError {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for PrometheusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PrometheusError");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl PrometheusError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
#[doc(hidden)]
pub fn name(&self) -> &'static str {
"PrometheusError"
}
}
impl std::fmt::Display for PrometheusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "PrometheusError")?;
if let Some(inner_1) = &self.message {
write!(f, ": {}", inner_1)?;
}
Ok(())
}
}
impl std::error::Error for PrometheusError {}
pub mod prometheus_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::PrometheusError {
crate::error::PrometheusError {
message: self.message,
}
}
}
}
impl PrometheusError {
pub fn builder() -> crate::error::prometheus_error::Builder {
crate::error::prometheus_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DocktorError {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for DocktorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DocktorError");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl DocktorError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
#[doc(hidden)]
pub fn name(&self) -> &'static str {
"DocktorError"
}
}
impl std::fmt::Display for DocktorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DocktorError")?;
if let Some(inner_2) = &self.message {
write!(f, ": {}", inner_2)?;
}
Ok(())
}
}
impl std::error::Error for DocktorError {}
pub mod docktor_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::DocktorError {
crate::error::DocktorError {
message: self.message,
}
}
}
}
impl DocktorError {
pub fn builder() -> crate::error::docktor_error::Builder {
crate::error::docktor_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SystemdError {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for SystemdError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("SystemdError");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl SystemdError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
#[doc(hidden)]
pub fn name(&self) -> &'static str {
"SystemdError"
}
}
impl std::fmt::Display for SystemdError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "SystemdError")?;
if let Some(inner_3) = &self.message {
write!(f, ": {}", inner_3)?;
}
Ok(())
}
}
impl std::error::Error for SystemdError {}
pub mod systemd_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::SystemdError {
crate::error::SystemdError {
message: self.message,
}
}
}
}
impl SystemdError {
pub fn builder() -> crate::error::systemd_error::Builder {
crate::error::systemd_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct HealtcheckError {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for HealtcheckError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("HealtcheckError");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl HealtcheckError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
#[doc(hidden)]
pub fn name(&self) -> &'static str {
"HealtcheckError"
}
}
impl std::fmt::Display for HealtcheckError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "HealtcheckError")?;
if let Some(inner_4) = &self.message {
write!(f, ": {}", inner_4)?;
}
Ok(())
}
}
impl std::error::Error for HealtcheckError {}
pub mod healtcheck_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::HealtcheckError {
crate::error::HealtcheckError {
message: self.message,
}
}
}
}
impl HealtcheckError {
pub fn builder() -> crate::error::healtcheck_error::Builder {
crate::error::healtcheck_error::Builder::default()
}
}