pub struct TlsConfigBuilder { /* private fields */ }
Available on crate feature
http2
only.Expand description
Builder to set the configuration for the Tls server.
Implementations§
Source§impl TlsConfigBuilder
impl TlsConfigBuilder
Sourcepub fn new() -> TlsConfigBuilder
pub fn new() -> TlsConfigBuilder
Create a new TlsConfigBuilder
Sourcepub fn key_path(self, path: impl AsRef<Path>) -> Self
pub fn key_path(self, path: impl AsRef<Path>) -> Self
sets the Tls key via File Path, returns TlsConfigError::IoError
if the file cannot be open
Sourcepub fn cert_path(self, path: impl AsRef<Path>) -> Self
pub fn cert_path(self, path: impl AsRef<Path>) -> Self
Specify the file path for the TLS certificate to use.
Sourcepub fn build(self) -> Result<ServerConfig, TlsConfigError>
pub fn build(self) -> Result<ServerConfig, TlsConfigError>
Builds TLS configuration.
Trait Implementations§
Source§impl Debug for TlsConfigBuilder
impl Debug for TlsConfigBuilder
Auto Trait Implementations§
impl Freeze for TlsConfigBuilder
impl !RefUnwindSafe for TlsConfigBuilder
impl Send for TlsConfigBuilder
impl Sync for TlsConfigBuilder
impl Unpin for TlsConfigBuilder
impl !UnwindSafe for TlsConfigBuilder
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