]> git.proxmox.com Git - proxmox-acme-rs.git/commitdiff
add Client::directory_url helper
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 7 May 2021 10:21:15 +0000 (12:21 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 7 May 2021 10:21:17 +0000 (12:21 +0200)
allows to drop a `mut` requirement in pmg-rs without having
to store the URL twice

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/client.rs

index 58baffad11b8d64806c8e0d248148a2b45e836ae..d30b626b7af3f1c1ec6abf8c610208a46b7a3cc6 100644 (file)
@@ -266,6 +266,14 @@ impl Client {
         }
     }
 
+    /// Get the directory URL without querying the `Directory` structure.
+    ///
+    /// The difference to [`get_directory`](Client::get_directory()) is that this does not
+    /// attempt to fetch the directory data from the ACME server.
+    pub fn directory_url(&self) -> &str {
+        &self.directory_url
+    }
+
     /// Set the account this client should use.
     pub fn set_account(&mut self, account: Account) {
         self.account = Some(account);