From 7767c7cfd531ffa83eec445803b0a07b7b59f4be Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 22 Apr 2024 10:31:29 +0200 Subject: [PATCH] maintenance: derive Copy for maintenance type and make maintenance mode fields public Because it is a public api type. Signed-off-by: Dietmar Maurer --- pbs-api-types/src/maintenance.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pbs-api-types/src/maintenance.rs b/pbs-api-types/src/maintenance.rs index a605cc17a..1e3413dca 100644 --- a/pbs-api-types/src/maintenance.rs +++ b/pbs-api-types/src/maintenance.rs @@ -33,7 +33,7 @@ pub enum Operation { } #[api] -#[derive(Deserialize, Serialize, PartialEq, Eq)] +#[derive(Copy, Clone, Deserialize, Serialize, PartialEq, Eq)] #[serde(rename_all = "kebab-case")] /// Maintenance type. pub enum MaintenanceType { @@ -69,11 +69,11 @@ serde_plain::derive_fromstr_from_deserialize!(MaintenanceType); pub struct MaintenanceMode { /// Type of maintenance ("read-only" or "offline"). #[serde(rename = "type")] - ty: MaintenanceType, + pub ty: MaintenanceType, /// Reason for maintenance. #[serde(skip_serializing_if = "Option::is_none")] - message: Option, + pub message: Option, } impl MaintenanceMode {