#[non_exhaustive]pub enum CertConfig {
LetsEncrypt {
acme_config: AcmeConfig,
server_config_builder: ConfigBuilder<ServerConfig, WantsServerCert>,
},
Manual {
server_config: ServerConfig,
},
}Available on crate feature
server only.Expand description
TLS certificate configuration.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
LetsEncrypt
Use Let’s Encrypt.
Fields
§
acme_config: AcmeConfigConfiguration for the ACME client.
§
server_config_builder: ConfigBuilder<ServerConfig, WantsServerCert>Builder for the [rustls::ServerConfig].
The ACME resolver will be injected when starting the server.
Manual
Use a TLS key and certificate chain that can be reloaded.
Fields
§
server_config: ServerConfigThe [rustls::ServerConfig] to use.
This needs to have the certificates or a certificate loader, it will be used by the server as-is.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CertConfig
impl !RefUnwindSafe for CertConfig
impl Send for CertConfig
impl Sync for CertConfig
impl Unpin for CertConfig
impl !UnwindSafe for CertConfig
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more