pub struct TlsConfig {
pub enabled: bool,
pub ca_cert_path: Option<String>,
pub client_cert_path: Option<String>,
pub client_key_path: Option<String>,
pub skip_verify: bool,
}Expand description
TLS configuration
Fields§
§enabled: boolEnable TLS
ca_cert_path: Option<String>Path to CA certificate file (PEM format)
client_cert_path: Option<String>Path to client certificate file (PEM format)
client_key_path: Option<String>Path to client key file (PEM format)
skip_verify: boolSkip server certificate verification (not recommended for production)
Implementations§
Source§impl TlsConfig
impl TlsConfig
Sourcepub fn with_ca_cert(self, path: impl Into<String>) -> Self
pub fn with_ca_cert(self, path: impl Into<String>) -> Self
Set CA certificate path
Sourcepub fn with_client_cert(
self,
cert_path: impl Into<String>,
key_path: impl Into<String>,
) -> Self
pub fn with_client_cert( self, cert_path: impl Into<String>, key_path: impl Into<String>, ) -> Self
Set client certificate and key paths
Sourcepub fn with_skip_verify(self, skip: bool) -> Self
pub fn with_skip_verify(self, skip: bool) -> Self
Skip server certificate verification
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 UnwindSafe for TlsConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request