From 999149ba3103fe3f2f30f26afaf67c5695df84d5 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Thu, 27 Jan 2022 12:08:11 +0100 Subject: [PATCH] Share the Available type across domain and host --- src/common.rs | 11 +++++++++++ src/domain/check.rs | 15 ++------------- src/host/check.rs | 15 ++------------- 3 files changed, 15 insertions(+), 26 deletions(-) diff --git a/src/common.rs b/src/common.rs index 4e97627..7487774 100644 --- a/src/common.rs +++ b/src/common.rs @@ -39,6 +39,17 @@ impl Extension for NoExtension { type Response = NoExtension; } +/// Type that represents the <name> tag for host check response +#[derive(Deserialize, Debug)] +pub struct Available { + /// The resource name + #[serde(rename = "$value")] + pub name: StringValue<'static>, + /// The resource (un)availability + #[serde(rename = "avail")] + pub available: bool, +} + /// The