Struct BoringServerTrustCache
#[non_exhaustive]pub struct BoringServerTrustCache { /* private fields */ }boring only.Expand description
A bounded cache of native server verification stores for one BoringSSL connector.
Clones share entries. Construct a new cache to isolate it from other connectors. Native roots, bundled WebPKI roots and the platform verifier use shared defaults when no custom anchors or reload policy applies. The default capacity is eight, allowing a few request policies and recent trust changes without retaining many native stores.
Implementations§
§impl BoringServerTrustCache
impl BoringServerTrustCache
pub const fn new(capacity: NonZero<usize>) -> BoringServerTrustCache
pub const fn new(capacity: NonZero<usize>) -> BoringServerTrustCache
Create an independent cache.
capacity separately bounds derived stores and stateless contexts.
pub fn server_verification(
&self,
extensions: &Extensions,
) -> Result<Option<Either<Arc<X509Store>, Arc<PlatformVerifier>>>, Box<dyn Error + Send + Sync>>
pub fn server_verification( &self, extensions: &Extensions, ) -> Result<Option<Either<Arc<X509Store>, Arc<PlatformVerifier>>>, Box<dyn Error + Send + Sync>>
Acquire native trust for the effective TLS configuration.
Returns None when verification is disabled or the backend’s default
or custom store applies. This synchronous operation can block.
pub async fn server_verification_async(
&self,
extensions: &Extensions,
) -> Result<Option<Either<Arc<X509Store>, Arc<PlatformVerifier>>>, Box<dyn Error + Send + Sync>>
pub async fn server_verification_async( &self, extensions: &Extensions, ) -> Result<Option<Either<Arc<X509Store>, Arc<PlatformVerifier>>>, Box<dyn Error + Send + Sync>>
Acquire native trust on a Tokio runtime.
Native trust reads and cold store construction run on blocking workers.
Returns None in the same cases as Self::server_verification.
Trait Implementations§
§impl Clone for BoringServerTrustCache
impl Clone for BoringServerTrustCache
§fn clone(&self) -> BoringServerTrustCache
fn clone(&self) -> BoringServerTrustCache
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 BoringServerTrustCache
impl Debug for BoringServerTrustCache
§impl Default for BoringServerTrustCache
impl Default for BoringServerTrustCache
§fn default() -> BoringServerTrustCache
fn default() -> BoringServerTrustCache
Auto Trait Implementations§
impl !Freeze for BoringServerTrustCache
impl !RefUnwindSafe for BoringServerTrustCache
impl !UnwindSafe for BoringServerTrustCache
impl Forget for BoringServerTrustCache
impl Move for BoringServerTrustCache
impl Send for BoringServerTrustCache
impl Sync for BoringServerTrustCache
impl Unpin for BoringServerTrustCache
impl UnsafeUnpin for BoringServerTrustCachewhere
NonZeroUsizeInner: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
*const ArcInner<OwnedCaches> is !null: UnsafeUnpin,
PhantomData<ArcInner<OwnedCaches>>: UnsafeUnpin,
PhantomData<Arc<OwnedCaches>>: UnsafeUnpin,
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