Struct salvo_core::conn::acme::AcmeConfigBuilder
source · pub struct AcmeConfigBuilder { /* private fields */ }
Available on crate feature
acme
only.Expand description
ACME configuration builder
Implementations§
source§impl 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<Vec<String>>) -> Self
pub fn contacts(self, contacts: impl Into<Vec<String>>) -> Self
Sets 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 Freeze for AcmeConfigBuilder
impl !RefUnwindSafe for AcmeConfigBuilder
impl Send for AcmeConfigBuilder
impl Sync for AcmeConfigBuilder
impl Unpin for AcmeConfigBuilder
impl !UnwindSafe for AcmeConfigBuilder
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more