From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 07F5D611B5 for ; Fri, 18 Feb 2022 09:21:16 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 060AC276C6 for ; Fri, 18 Feb 2022 09:21:16 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 86D38276BB for ; Fri, 18 Feb 2022 09:21:15 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 5A5144498B for ; Fri, 18 Feb 2022 09:21:15 +0100 (CET) Message-ID: Date: Fri, 18 Feb 2022 09:21:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Content-Language: en-US To: Proxmox Backup Server development discussion , Dominik Csapak References: <20220217094041.1632033-1-d.csapak@proxmox.com> <20220217094041.1632033-3-d.csapak@proxmox.com> From: Dietmar Maurer In-Reply-To: <20220217094041.1632033-3-d.csapak@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.466 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.001 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pbs-devel] [RFC PATCH proxmox 2/4] promxox-router: add SerializableReturn Trait X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Feb 2022 08:21:16 -0000 I guess we do not want to depend on proxmox-async here - this adds to many unnecessary dependencies! On 2/17/22 10:40, Dominik Csapak wrote: > this will be useful as a generic return type for api calls which > must implement Serialize. > > Signed-off-by: Dominik Csapak > --- > proxmox-router/Cargo.toml | 2 + > proxmox-router/src/lib.rs | 2 + > proxmox-router/src/serializable_return.rs | 62 +++++++++++++++++++++++ > 3 files changed, 66 insertions(+) > create mode 100644 proxmox-router/src/serializable_return.rs > > diff --git a/proxmox-router/Cargo.toml b/proxmox-router/Cargo.toml > index 28616d8..d460772 100644 > --- a/proxmox-router/Cargo.toml > +++ b/proxmox-router/Cargo.toml > @@ -15,6 +15,7 @@ hyper = { version = "0.14", features = [ "full" ] } > nix = "0.19.1" > percent-encoding = "2.1" > serde_json = "1.0" > +serde = "1.0" > unicode-width ="0.1.8" > > # cli: > @@ -24,6 +25,7 @@ libc = { version = "0.2", optional = true } > > proxmox-lang = { path = "../proxmox-lang", version = "1.0" } > proxmox-schema = { path = "../proxmox-schema", version = "1.1" } > +proxmox-async = { path = "../proxmox-async", version = "0.3" }