From 5f4b5714504f657db9d0cb02ac31018fcf23c91b Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 7 May 2021 12:21:15 +0200 Subject: [PATCH] add Client::directory_url helper allows to drop a `mut` requirement in pmg-rs without having to store the URL twice Signed-off-by: Wolfgang Bumiller --- src/client.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/client.rs b/src/client.rs index 58baffad..d30b626b 100644 --- a/src/client.rs +++ b/src/client.rs @@ -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);