Struct salvo_core::listener::acme::AcmeListenerBuilder
source · [−]pub struct AcmeListenerBuilder { /* private fields */ }
acme
only.Expand description
AcmeListenerBuilder
Implementations
sourceimpl AcmeListenerBuilder
impl AcmeListenerBuilder
sourcepub fn get_directory(
self,
name: impl Into<String>,
url: impl Into<String>
) -> Self
pub fn get_directory(
self,
name: impl Into<String>,
url: impl Into<String>
) -> Self
Sets the directory.
Defaults to lets encrypt.
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
Add contact emails 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, router: &mut Router) -> Self
pub fn http01_challege(self, router: &mut Router) -> Self
Create an handler for HTTP-01 challenge
sourcepub fn tls_alpn01_challege(self) -> Self
pub fn tls_alpn01_challege(self) -> Self
Create an handler for HTTP-01 challenge
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 async fn bind(self, incoming: impl IntoAddrIncoming) -> AcmeListener
pub async fn bind(self, incoming: impl IntoAddrIncoming) -> AcmeListener
Consumes this builder and returns a AcmeListener
object.
sourcepub async fn try_bind(
self,
incoming: impl IntoAddrIncoming
) -> IoResult<AcmeListener>
pub async fn try_bind(
self,
incoming: impl IntoAddrIncoming
) -> IoResult<AcmeListener>
Consumes this builder and returns a Result<AcmeListener, std::IoError>
object.
Auto Trait Implementations
impl !RefUnwindSafe for AcmeListenerBuilder
impl Send for AcmeListenerBuilder
impl Sync for AcmeListenerBuilder
impl Unpin for AcmeListenerBuilder
impl !UnwindSafe for AcmeListenerBuilder
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