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 <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2021-05-07 12:21:15 +02:00
parent 1d1f80f5ca
commit 5f4b571450

View 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);