Struct salvo_core::listener::acme::AcmeConfigBuilder
source · [−]pub struct AcmeConfigBuilder { /* private fields */ }
acme
only.Expand description
ACME configuration builder
Implementations
sourceimpl AcmeConfigBuilder
impl AcmeConfigBuilder
sourcepub fn directory(self, name: impl Into<String>, url: impl Into<String>) -> Self
pub fn directory(self, name: impl Into<String>, url: impl Into<String>) -> Self
Sets the directory url.
Defaults to lets encrypt production.
sourcepub fn add_domain(self, domain: impl Into<String>) -> Self
pub fn add_domain(self, domain: impl Into<String>) -> Self
Add a domain.
sourcepub fn contacts(self, contacts: impl Into<HashSet<String>>) -> Self
pub fn contacts(self, contacts: impl Into<HashSet<String>>) -> Self
Set contact email for the ACME account.
sourcepub fn add_contact(self, contact: impl Into<String>) -> Self
pub fn add_contact(self, contact: impl Into<String>) -> Self
Add a contact email for the ACME account.
sourcepub fn http01_challege(self) -> Self
pub fn http01_challege(self) -> Self
Sets the challenge type Http01
sourcepub fn tls_alpn01_challege(self) -> Self
pub fn tls_alpn01_challege(self) -> Self
Sets the challenge type TlsAlpn01
sourcepub fn cache_path(self, path: impl Into<PathBuf>) -> Self
pub fn cache_path(self, path: impl Into<PathBuf>) -> Self
Sets the cache path for caching certificates.
This is not a necessary option. If you do not configure the cache path, the obtained certificate will be stored in memory and will need to be obtained again when the server is restarted next time.
sourcepub fn before_expired(self, before_expired: Duration) -> Self
pub fn before_expired(self, before_expired: Duration) -> Self
Sets the duration update certificate before it expired.
sourcepub fn build(self) -> IoResult<AcmeConfig>
pub fn build(self) -> IoResult<AcmeConfig>
Consumes this builder and returns a AcmeConfig
object.
Auto Trait Implementations
impl !RefUnwindSafe for AcmeConfigBuilder
impl Send for AcmeConfigBuilder
impl Sync for AcmeConfigBuilder
impl Unpin for AcmeConfigBuilder
impl !UnwindSafe for AcmeConfigBuilder
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