From: Dietmar Maurer <dietmar@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup v4 2/3] maintenance: derive Copy for maintenance type and make maintenance mode fields public
Date: Mon, 22 Apr 2024 10:31:29 +0200 [thread overview]
Message-ID: <20240422083130.2921004-3-dietmar@proxmox.com> (raw)
In-Reply-To: <20240422083130.2921004-1-dietmar@proxmox.com>
Because it is a public api type.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
---
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 a605cc17..1e3413dc 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<String>,
+ pub message: Option<String>,
}
impl MaintenanceMode {
--
2.39.2
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2024-04-22 8:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-22 8:31 [pbs-devel] [PATCH proxmox-backup v4 0/3] pbs-api-types: new MaintenanceType::Unmount, implement and use set_maintenance_mode Dietmar Maurer
2024-04-22 8:31 ` [pbs-devel] [PATCH proxmox-backup v4 1/3] pbs-api-types: use SchemaDeserializer for maintenance mode Dietmar Maurer
2024-04-22 8:31 ` Dietmar Maurer [this message]
2024-04-22 8:31 ` [pbs-devel] [PATCH proxmox-backup v4 3/3] api: assert that maintenance mode transitions are valid Dietmar Maurer
2024-04-22 10:20 ` [pbs-devel] applied-series: [PATCH proxmox-backup v4 0/3] pbs-api-types: new MaintenanceType::Unmount, implement and use set_maintenance_mode Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240422083130.2921004-3-dietmar@proxmox.com \
--to=dietmar@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox