Struct ClientTlsConfig
pub struct ClientTlsConfig { /* private fields */ }grpc only.Expand description
Configures TLS settings for endpoints.
Implementations§
§impl ClientTlsConfig
impl ClientTlsConfig
pub fn new() -> ClientTlsConfig
pub fn new() -> ClientTlsConfig
Creates a new ClientTlsConfig using Rustls.
pub fn domain_name(self, domain_name: impl Into<String>) -> ClientTlsConfig
pub fn domain_name(self, domain_name: impl Into<String>) -> ClientTlsConfig
Sets the domain name against which to verify the server’s TLS certificate.
pub fn ca_certificate(self, ca_certificate: Certificate) -> ClientTlsConfig
pub fn ca_certificate(self, ca_certificate: Certificate) -> ClientTlsConfig
Adds the CA Certificate against which to verify the server’s TLS certificate.
pub fn ca_certificates(
self,
ca_certificates: impl IntoIterator<Item = Certificate>,
) -> ClientTlsConfig
pub fn ca_certificates( self, ca_certificates: impl IntoIterator<Item = Certificate>, ) -> ClientTlsConfig
Adds the multiple CA Certificates against which to verify the server’s TLS certificate.
pub fn trust_anchor(self, trust_anchor: TrustAnchor<'static>) -> ClientTlsConfig
pub fn trust_anchor(self, trust_anchor: TrustAnchor<'static>) -> ClientTlsConfig
Adds the trust anchor which to verify the server’s TLS certificate.
pub fn trust_anchors(
self,
trust_anchors: impl IntoIterator<Item = TrustAnchor<'static>>,
) -> ClientTlsConfig
pub fn trust_anchors( self, trust_anchors: impl IntoIterator<Item = TrustAnchor<'static>>, ) -> ClientTlsConfig
Adds the multiple trust anchors which to verify the server’s TLS certificate.
pub fn identity(self, identity: Identity) -> ClientTlsConfig
pub fn identity(self, identity: Identity) -> ClientTlsConfig
Sets the client identity to present to the server.
pub fn assume_http2(self, assume_http2: bool) -> ClientTlsConfig
pub fn assume_http2(self, assume_http2: bool) -> ClientTlsConfig
If true, the connector should assume that the server supports HTTP/2, even if it doesn’t provide protocol negotiation via ALPN.
pub fn use_key_log(self) -> ClientTlsConfig
pub fn use_key_log(self) -> ClientTlsConfig
Use key log as specified by the SSLKEYLOGFILE environment variable.
pub fn with_webpki_roots(self) -> ClientTlsConfig
Available on crate feature tls-webpki-roots only.
pub fn with_webpki_roots(self) -> ClientTlsConfig
tls-webpki-roots only.Enables the webpki roots.
pub fn with_enabled_roots(self) -> ClientTlsConfig
pub fn with_enabled_roots(self) -> ClientTlsConfig
Activates all TLS roots enabled through tls-*-roots feature flags
pub fn timeout(self, timeout: Duration) -> ClientTlsConfig
pub fn timeout(self, timeout: Duration) -> ClientTlsConfig
Sets the timeout for the TLS handshake.
Trait Implementations§
§impl Clone for ClientTlsConfig
impl Clone for ClientTlsConfig
§fn clone(&self) -> ClientTlsConfig
fn clone(&self) -> ClientTlsConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ClientTlsConfig
impl Debug for ClientTlsConfig
§impl Default for ClientTlsConfig
impl Default for ClientTlsConfig
§fn default() -> ClientTlsConfig
fn default() -> ClientTlsConfig
Auto Trait Implementations§
impl Forget for ClientTlsConfig
impl Freeze for ClientTlsConfig
impl Move for ClientTlsConfig
impl RefUnwindSafe for ClientTlsConfig
impl Send for ClientTlsConfig
impl Sync for ClientTlsConfig
impl Unpin for ClientTlsConfig
impl UnsafeUnpin for ClientTlsConfig
impl UnwindSafe for ClientTlsConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§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> ⓘ
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> ⓘ
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].