From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox 3/3] client: move to proxmox_serde perl helpers
Date: Tue, 13 May 2025 12:14:56 +0200 [thread overview]
Message-ID: <20250513101459.122641-4-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20250513101459.122641-1-s.hanreich@proxmox.com>
The perl helpers have been moved to proxmox_serde from proxmox_login,
so fix all occurences using the proxmox_login crate.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
proxmox-client/Cargo.toml | 2 ++
proxmox-client/src/lib.rs | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/proxmox-client/Cargo.toml b/proxmox-client/Cargo.toml
index c2682e77..b15c9faa 100644
--- a/proxmox-client/Cargo.toml
+++ b/proxmox-client/Cargo.toml
@@ -27,6 +27,8 @@ proxmox-login = { workspace = true, features = [ "http" ] }
proxmox-http = { workspace = true, optional = true, features = [ "client" ] }
hyper = { workspace = true, optional = true }
+proxmox-serde = { workspace = true, features = [ "perl" ] }
+
[dev-dependencies]
serde_plain.workspace = true
diff --git a/proxmox-client/src/lib.rs b/proxmox-client/src/lib.rs
index e802f4ce..f1df1e1d 100644
--- a/proxmox-client/src/lib.rs
+++ b/proxmox-client/src/lib.rs
@@ -173,10 +173,10 @@ pub struct ApiResponseData<T> {
#[derive(serde::Deserialize)]
struct RawApiResponse<T> {
- #[serde(default, deserialize_with = "proxmox_login::parse::deserialize_u16")]
+ #[serde(default, deserialize_with = "proxmox_serde::perl::deserialize_u16")]
status: Option<u16>,
message: Option<String>,
- #[serde(default, deserialize_with = "proxmox_login::parse::deserialize_bool")]
+ #[serde(default, deserialize_with = "proxmox_serde::perl::deserialize_bool")]
success: Option<bool>,
data: Option<T>,
--
2.39.5
_______________________________________________
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:[~2025-05-13 10:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-13 10:14 [pbs-devel] [PATCH proxmox{, -api-types, -ve-rs} 0/6] Move perl deserializers from proxmox-login to proxmox-serde Stefan Hanreich
2025-05-13 10:14 ` [pbs-devel] [PATCH proxmox 1/3] serde: add parsing helpers for perl Stefan Hanreich
2025-05-13 10:14 ` [pbs-devel] [PATCH proxmox 2/3] login: move parse module to proxmox-serde Stefan Hanreich
2025-05-13 10:14 ` Stefan Hanreich [this message]
2025-05-13 10:14 ` [pbs-devel] [PATCH proxmox-api-types 1/2] generator: use proxmox_serde for perl helpers Stefan Hanreich
2025-05-13 11:44 ` Stefan Hanreich
2025-05-13 10:14 ` [pbs-devel] [PATCH proxmox-ve-rs 1/1] config: use proxmox_serde " Stefan Hanreich
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=20250513101459.122641-4-s.hanreich@proxmox.com \
--to=s.hanreich@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