pub struct TlsConfig {
pub server_config: Arc<ServerConfig>,
}Expand description
Parsed TLS configuration ready for axum-server.
Wraps a rustls::ServerConfig.
Fields§
§server_config: Arc<ServerConfig>The underlying rustls server config, wrapped in Arc so multiple
listeners can share it.
Implementations§
Source§impl TlsConfig
impl TlsConfig
Sourcepub fn load_internal(paths: &InternalCertPaths) -> Result<Self, Error>
pub fn load_internal(paths: &InternalCertPaths) -> Result<Self, Error>
Load + build a TLS config for an internal (mTLS) server.
Sourcepub fn load_public(paths: &PublicCertPaths) -> Result<Self, Error>
pub fn load_public(paths: &PublicCertPaths) -> Result<Self, Error>
Load + build a TLS config for a public HTTPS server (no mTLS).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TlsConfig
impl !RefUnwindSafe for TlsConfig
impl Send for TlsConfig
impl Sync for TlsConfig
impl Unpin for TlsConfig
impl UnsafeUnpin for TlsConfig
impl !UnwindSafe for TlsConfig
Blanket Implementations§
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