Struct RustlsTlsConnectorConfig
pub struct RustlsTlsConnectorConfig<'a> {Show 15 fields
pub session_profile_scope: Option<&'a TlsSessionProfileScope>,
pub client_handshake: Option<&'a ClientHandshake>,
pub alpn: Option<&'a TlsAlpn>,
pub alpn_policy: Option<&'a AlpnPolicy>,
pub versions: Option<&'a TlsSupportedVersions>,
pub verify: Option<&'a TlsServerVerify>,
pub keylog: Option<&'a TlsKeyLog>,
pub server_name: Option<&'a TlsServerName>,
pub store_chain: Option<&'a TlsStoreServerCertChain>,
pub client_auth: Option<&'a TlsClientAuth>,
pub server_cert_pins: Option<&'a TlsServerCertPins>,
pub server_trust: Option<&'a TlsServerTrust>,
pub server_cert_chain_policy: Option<&'a DynTlsServerCertChainPolicy>,
pub verifier: Option<Arc<RustlsServerCertVerifier>>,
pub modify: Option<Arc<ModifyRustlsClientConfig>>,
}rustls only.Expand description
Gather all the TLS extensions supported by rustls
Fields§
§session_profile_scope: Option<&'a TlsSessionProfileScope>§client_handshake: Option<&'a ClientHandshake>§alpn: Option<&'a TlsAlpn>§alpn_policy: Option<&'a AlpnPolicy>§versions: Option<&'a TlsSupportedVersions>§verify: Option<&'a TlsServerVerify>§keylog: Option<&'a TlsKeyLog>§server_name: Option<&'a TlsServerName>§store_chain: Option<&'a TlsStoreServerCertChain>§client_auth: Option<&'a TlsClientAuth>§server_cert_pins: Option<&'a TlsServerCertPins>§server_trust: Option<&'a TlsServerTrust>§server_cert_chain_policy: Option<&'a DynTlsServerCertChainPolicy>§verifier: Option<Arc<RustlsServerCertVerifier>>§modify: Option<Arc<ModifyRustlsClientConfig>>Implementations§
§impl<'a> RustlsTlsConnectorConfig<'a>
impl<'a> RustlsTlsConnectorConfig<'a>
pub fn from_extensions(ext: &'a Extensions) -> RustlsTlsConnectorConfig<'a>
pub fn from_extensions(ext: &'a Extensions) -> RustlsTlsConnectorConfig<'a>
Gather these extension pieces from ext in a single pass.
Generated by #[derive(FromExtensions)]. Each field uses the
same lookup as Extensions::get_ref (newest-wins, walks wrappers
and the parent chain), but the store is traversed only once, even
for nested group fields, whose candidates are folded into
the same pass. A field shaped Option<(&'a T, usize)> (or
Option<(Arc<T>, usize)>) also captures the entry’s traversal rank,
0 is the newest value seen, growing for older ones, so ranks
order fields by recency.
§impl RustlsTlsConnectorConfig<'_>
impl RustlsTlsConnectorConfig<'_>
pub fn pool_id(&self) -> Option<TlsPoolId>
pub fn pool_id(&self) -> Option<TlsPoolId>
Compact identity of request-level overrides, or None for the baseline.
Explicit defaults remain distinct from absence. Equivalent settings compare independently of the TLS implementation. Shared hooks, verifiers and log sinks reuse connections while retaining their original instance identity. Connector defaults are fixed for the lifetime of the pool and must not be layered onto this request-only view.
pub fn peer_matches_name(&self, leaf: &CertificateDer<'_>, name: &Host) -> bool
pub fn peer_matches_name(&self, leaf: &CertificateDer<'_>, name: &Host) -> bool
Whether the leaf of a connection authenticated under this configuration
is also valid for name, including pins scoped to that name.
A chain policy, and the platform verifier with its per-name trust settings, judge a chain for one server name, so such a connection is never reused for another name.
pub fn authenticates_server(&self) -> bool
pub fn authenticates_server(&self) -> bool
Whether a successful handshake establishes the configured server identity.
pub fn try_into_client_config_with_provider(
self,
provider: Arc<CryptoProvider>,
) -> Result<ClientConfig, Box<dyn Error + Sync + Send>>
pub fn try_into_client_config_with_provider( self, provider: Arc<CryptoProvider>, ) -> Result<ClientConfig, Box<dyn Error + Sync + Send>>
Build a native TLS client configuration using the supplied cryptographic provider.
This does not read or install the process-wide default provider. Certificate verification uses the same provider. The modify hook runs last and may replace the configuration, including its provider.
Trait Implementations§
§impl<'a> Clone for RustlsTlsConnectorConfig<'a>
impl<'a> Clone for RustlsTlsConnectorConfig<'a>
§fn clone(&self) -> RustlsTlsConnectorConfig<'a>
fn clone(&self) -> RustlsTlsConnectorConfig<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl TryFrom<RustlsTlsConnectorConfig<'_>> for ClientConfig
impl TryFrom<RustlsTlsConnectorConfig<'_>> for ClientConfig
§fn try_from(
value: RustlsTlsConnectorConfig<'_>,
) -> Result<ClientConfig, <ClientConfig as TryFrom<RustlsTlsConnectorConfig<'_>>>::Error>
fn try_from( value: RustlsTlsConnectorConfig<'_>, ) -> Result<ClientConfig, <ClientConfig as TryFrom<RustlsTlsConnectorConfig<'_>>>::Error>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for RustlsTlsConnectorConfig<'a>
impl<'a> !UnwindSafe for RustlsTlsConnectorConfig<'a>
impl<'a> Freeze for RustlsTlsConnectorConfig<'a>
impl<'a> Send for RustlsTlsConnectorConfig<'a>
impl<'a> Sync for RustlsTlsConnectorConfig<'a>
impl<'a> Unpin for RustlsTlsConnectorConfig<'a>
impl<'a> UnsafeUnpin for RustlsTlsConnectorConfig<'a>
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 rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more