pub async fn mount<'a, F: Future + Send + 'a>(
set_host_cert: impl FnMut(CertifiedKey) -> F + Send + Sync + 'static,
host: &Host,
extensions: &mut Extensions,
new_cert_immediately: bool,
contact: impl IntoIterator<Item = String>,
account_path: impl AsRef<Path>,
cert_path: impl AsRef<Path>,
pk_path: impl AsRef<Path>,
dev: bool,
)Available on crate feature
certificate only.Expand description
Attach automatic certificate generation to a host.
set_host_cert is a callback, since we can’t move host into a 'static context, so you have
to provide some method of calling Host::live_set_certificate on host (e.g. by saving a
Arc<host::Collection> and getting the host from that).
new_cert_immediately should only be used when testing, since this extension reads the current
cert and only updates it as needed.