pub struct AcmeConfig<EC, EA = EC>{ /* private fields */ }Expand description
Configuration for an ACME resolver.
The type parameters represent the error types for the certificate cache and account cache.
Implementations§
Source§impl AcmeConfig<Infallible>
impl AcmeConfig<Infallible>
Sourcepub fn new(
domains: impl IntoIterator<Item = impl AsRef<str>>,
) -> AcmeConfig<Infallible>
pub fn new( domains: impl IntoIterator<Item = impl AsRef<str>>, ) -> AcmeConfig<Infallible>
Creates a new AcmeConfig instance.
The new AcmeConfig instance will initially have no cache, and its type parameters for
error types will be Infallible since the cache cannot return an error. The methods to set
a cache will change the error types to match those returned by the supplied cache.
use rustls_acme::caches::DirCache;
let config = AcmeConfig::new(["example.com"]).cache(DirCache::new("./rustls_acme_cache"));Due to limited support for type parameter inference in Rust (see RFC213), AcmeConfig::new is not (yet) generic over the AcmeConfig’s type parameters. An uncached instance of AcmeConfig with particular type parameters can be created using NoCache.
use rustls_acme::caches::NoCache;
let config: AcmeConfig<EC, EA> = AcmeConfig::new(["example.com"]).cache(NoCache::new());Source§impl<EC, EA> AcmeConfig<EC, EA>
impl<EC, EA> AcmeConfig<EC, EA>
pub fn directory(self, directory_url: impl AsRef<str>) -> AcmeConfig<EC, EA>
pub fn directory_lets_encrypt(self, production: bool) -> AcmeConfig<EC, EA>
pub fn domains( self, contact: impl IntoIterator<Item = impl AsRef<str>>, ) -> AcmeConfig<EC, EA>
pub fn domains_push(self, contact: impl AsRef<str>) -> AcmeConfig<EC, EA>
Sourcepub fn contact(
self,
contact: impl IntoIterator<Item = impl AsRef<str>>,
) -> AcmeConfig<EC, EA>
pub fn contact( self, contact: impl IntoIterator<Item = impl AsRef<str>>, ) -> AcmeConfig<EC, EA>
Provide a list of contacts for the account.
Note that email addresses must include a mailto: prefix.
Sourcepub fn contact_push(self, contact: impl AsRef<str>) -> AcmeConfig<EC, EA>
pub fn contact_push(self, contact: impl AsRef<str>) -> AcmeConfig<EC, EA>
Provide a contact for the account.
Note that an email address must include a mailto: prefix.