Struct salvo_core::conn::acme::AcmeListener
source · pub struct AcmeListener<T> { /* private fields */ }
Available on crate feature
acme
only.Expand description
A wrapper around an underlying listener which implements the ACME.
Implementations§
source§impl<T> AcmeListener<T>
impl<T> AcmeListener<T>
sourcepub fn new(inner: T) -> AcmeListener<T>
pub fn new(inner: T) -> AcmeListener<T>
Create AcmeListener
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<Vec<String>>) -> Self
pub fn contacts(self, contacts: impl Into<Vec<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 fn quinn<A>(self, local_addr: A) -> AcmeQuinnListener<T, A>where
A: ToSocketAddrs + Send,
Available on crate feature quinn
only.
pub fn quinn<A>(self, local_addr: A) -> AcmeQuinnListener<T, A>where
A: ToSocketAddrs + Send,
quinn
only.Enable Http3 using quinn.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for AcmeListener<T>where
T: Freeze,
impl<T> !RefUnwindSafe for AcmeListener<T>
impl<T> Send for AcmeListener<T>where
T: Send,
impl<T> Sync for AcmeListener<T>where
T: Sync,
impl<T> Unpin for AcmeListener<T>where
T: Unpin,
impl<T> !UnwindSafe for AcmeListener<T>
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