Struct rustls_acme::AcmeConfig

source ·
pub struct AcmeConfig<EC: Debug, EA: Debug = 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

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

Set custom rustls::ClientConfig for ACME API calls.

Provide a list of contacts for the account.

Note that email addresses must include a mailto: prefix.

Provide a contact for the account.

Note that an email address must include a mailto: prefix.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.