AcmeConfig

Struct AcmeConfig 

Source
pub struct AcmeConfig<EC, EA = EC>
where EC: Debug, EA: Debug,
{ /* 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>

Source

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>
where EC: 'static + Debug, EA: 'static + Debug,

Source

pub fn directory(self, directory_url: impl AsRef<str>) -> AcmeConfig<EC, EA>

Source

pub fn directory_lets_encrypt(self, production: bool) -> AcmeConfig<EC, EA>

Source

pub fn domains( self, contact: impl IntoIterator<Item = impl AsRef<str>>, ) -> AcmeConfig<EC, EA>

Source

pub fn domains_push(self, contact: impl AsRef<str>) -> AcmeConfig<EC, EA>

Source

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.

Source

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.

Source

pub fn cache<C>( self, cache: C, ) -> AcmeConfig<<C as CertCache>::EC, <C as AccountCache>::EA>
where C: 'static + Cache,

Source

pub fn cache_compose<CC, CA>( self, cert_cache: CC, account_cache: CA, ) -> AcmeConfig<<CC as CertCache>::EC, <CA as AccountCache>::EA>
where CC: 'static + CertCache, CA: 'static + AccountCache,

Source

pub fn cache_with_boxed_err<C>(self, cache: C) -> AcmeConfig<Box<dyn Debug>>
where C: 'static + Cache,

Source

pub fn cache_option<C>( self, cache: Option<C>, ) -> AcmeConfig<<C as CertCache>::EC, <C as AccountCache>::EA>
where C: 'static + Cache,

Source

pub fn state(self) -> AcmeState<EC, EA>

Source

pub fn incoming<TCP, ETCP, ITCP>( self, tcp_incoming: ITCP, ) -> Incoming<TCP, ETCP, ITCP, EC, EA>
where TCP: AsyncRead + AsyncWrite + Unpin, ITCP: Stream<Item = Result<TCP, ETCP>>,

Auto Trait Implementations§

§

impl<EC, EA> Freeze for AcmeConfig<EC, EA>

§

impl<EC, EA = EC> !RefUnwindSafe for AcmeConfig<EC, EA>

§

impl<EC, EA> Send for AcmeConfig<EC, EA>

§

impl<EC, EA> Sync for AcmeConfig<EC, EA>

§

impl<EC, EA> Unpin for AcmeConfig<EC, EA>

§

impl<EC, EA = EC> !UnwindSafe for AcmeConfig<EC, EA>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T> AsTaggedExplicit<'a> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self>

Source§

impl<'a, T> AsTaggedImplicit<'a> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,