pub struct VersionQueryInterceptor;Expand description
Adds A2A-Version=<version> to every request’s query parameters (spec
§3.6.1); see the module documentation.
A parameter of that name the request already carries, under any case, is left as it is.
use a2a_protocol_client::ClientBuilder;
use a2a_protocol_client::version_query::VersionQueryInterceptor;
let builder = ClientBuilder::new("http://localhost:8080")
.with_interceptor(VersionQueryInterceptor::new());Implementations§
Source§impl VersionQueryInterceptor
impl VersionQueryInterceptor
Sourcepub const fn new() -> VersionQueryInterceptor
pub const fn new() -> VersionQueryInterceptor
Creates the interceptor.
Trait Implementations§
Source§impl CallInterceptor for VersionQueryInterceptor
impl CallInterceptor for VersionQueryInterceptor
Source§fn before<'a>(
&'a self,
req: &'a mut ClientRequest,
) -> impl Future<Output = Result<(), ClientError>> + Send + 'a
fn before<'a>( &'a self, req: &'a mut ClientRequest, ) -> impl Future<Output = Result<(), ClientError>> + Send + 'a
Called before the request is sent. Read more
Source§fn after<'a>(
&'a self,
_resp: &'a ClientResponse,
) -> impl Future<Output = Result<(), ClientError>> + Send + 'a
fn after<'a>( &'a self, _resp: &'a ClientResponse, ) -> impl Future<Output = Result<(), ClientError>> + Send + 'a
Called after a successful response is received. Read more
Source§fn on_error<'a>(
&'a self,
req: &'a ClientRequest,
err: &'a ClientError,
) -> impl Future<Output = ()> + Send + 'a
fn on_error<'a>( &'a self, req: &'a ClientRequest, err: &'a ClientError, ) -> impl Future<Output = ()> + Send + 'a
Called when the transport returns an error for a request this chain’s
before hooks saw, in reverse registration order like after. Read moreSource§impl Clone for VersionQueryInterceptor
impl Clone for VersionQueryInterceptor
Source§fn clone(&self) -> VersionQueryInterceptor
fn clone(&self) -> VersionQueryInterceptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for VersionQueryInterceptor
Source§impl Debug for VersionQueryInterceptor
impl Debug for VersionQueryInterceptor
Source§impl Default for VersionQueryInterceptor
impl Default for VersionQueryInterceptor
Source§fn default() -> VersionQueryInterceptor
fn default() -> VersionQueryInterceptor
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Forget for VersionQueryInterceptor
impl Freeze for VersionQueryInterceptor
impl Move for VersionQueryInterceptor
impl RefUnwindSafe for VersionQueryInterceptor
impl Send for VersionQueryInterceptor
impl Sync for VersionQueryInterceptor
impl Unpin for VersionQueryInterceptor
impl UnsafeUnpin for VersionQueryInterceptor
impl UnwindSafe for VersionQueryInterceptor
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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>
Wrap the input message
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>,
Applies the layer to a service and wraps it in [
Layered].