pub struct CoalescingClientBuilder<C> { /* private fields */ }Expand description
Builder for CoalescingClient.
Implementations§
Source§impl<C> CoalescingClientBuilder<C>
impl<C> CoalescingClientBuilder<C>
Sourcepub fn coalesce(self, enabled: bool) -> Self
pub fn coalesce(self, enabled: bool) -> Self
Enable or disable coalescing for all methods. Default: true.
Sourcepub fn cache(self, method: impl Into<String>, cfg: CacheConfig) -> Self
pub fn cache(self, method: impl Into<String>, cfg: CacheConfig) -> Self
Add a TTL response cache for method. Off by default; must opt in.
Sourcepub fn key_fn(self, f: impl KeyFn) -> Self
pub fn key_fn(self, f: impl KeyFn) -> Self
Override the key derivation function. The default includes only
request bytes in the key. Supply a custom KeyFn when responses
vary by caller identity (e.g. include the auth principal header).
pub fn build(self) -> CoalescingClient<C>
Auto Trait Implementations§
impl<C> !RefUnwindSafe for CoalescingClientBuilder<C>
impl<C> !UnwindSafe for CoalescingClientBuilder<C>
impl<C> Freeze for CoalescingClientBuilder<C>where
C: Freeze,
impl<C> Send for CoalescingClientBuilder<C>where
C: Send,
impl<C> Sync for CoalescingClientBuilder<C>where
C: Sync,
impl<C> Unpin for CoalescingClientBuilder<C>where
C: Unpin,
impl<C> UnsafeUnpin for CoalescingClientBuilder<C>where
C: UnsafeUnpin,
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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