Struct tide_acme::AcmeConfig
source · [−]Expand description
Configuration for an ACME resolver.
The type parameters represent the error types for the certificate cache and account cache.
Implementations
sourceimpl AcmeConfig<Infallible, Infallible>
impl AcmeConfig<Infallible, Infallible>
sourcepub fn new(
domains: impl IntoIterator<Item = impl AsRef<str>>
) -> AcmeConfig<Infallible, Infallible>
pub fn new(
domains: impl IntoIterator<Item = impl AsRef<str>>
) -> AcmeConfig<Infallible, 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());
sourceimpl<EC, EA> AcmeConfig<EC, EA> where
EC: 'static + Debug,
EA: 'static + Debug,
impl<EC, EA> AcmeConfig<EC, EA> where
EC: 'static + Debug,
EA: 'static + Debug,
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.
pub fn cache<C>(
self,
cache: C
) -> AcmeConfig<<C as CertCache>::EC, <C as AccountCache>::EA> where
C: 'static + Cache,
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,
pub fn cache_with_boxed_err<C>(
self,
cache: C
) -> AcmeConfig<Box<dyn Debug + 'static, Global>, Box<dyn Debug + 'static, Global>> where
C: 'static + Cache,
pub fn cache_option<C>(
self,
cache: Option<C>
) -> AcmeConfig<<C as CertCache>::EC, <C as AccountCache>::EA> where
C: 'static + Cache,
pub fn state(self) -> AcmeState<EC, EA>
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 = 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more