pub struct ClientRequest {
pub method: String,
pub params: Value,
pub extra_headers: HashMap<String, String>,
pub query_params: Vec<(String, String)>,
}Expand description
A logical A2A request as seen by interceptors.
Interceptors may mutate params and extra_headers before the request is
dispatched to the transport layer.
Its Debug prints the header names and the keys of params, never a
value: the headers carry credentials and the params of a push-config call
carry the webhook’s token and credentials.
Fields§
§method: StringThe A2A method name (e.g. "message/send").
params: ValueMethod parameters as a JSON value.
extra_headers: HashMap<String, String>Additional HTTP headers to include with this request.
Auth interceptors use this to inject Authorization headers.
query_params: Vec<(String, String)>Parameters to append to the request URL’s query string, in order.
An AuthInterceptor for an API key
located in: query puts it here (a2a.proto
APIKeySecurityScheme.location). The JSON-RPC and HTTP+JSON
transports send them; a transport that cannot refuses the call
rather than dropping them (Transport::send_request_with_query).
A credential in a URL can reach server and proxy access logs, which
is why the specification lists the header first.
Implementations§
Source§impl ClientRequest
impl ClientRequest
Sourcepub fn new(method: impl Into<String>, params: Value) -> ClientRequest
pub fn new(method: impl Into<String>, params: Value) -> ClientRequest
Creates a new ClientRequest with the given method and params.
Trait Implementations§
Auto Trait Implementations§
impl Forget for ClientRequest
impl Freeze for ClientRequest
impl Move for ClientRequest
impl RefUnwindSafe for ClientRequest
impl Send for ClientRequest
impl Sync for ClientRequest
impl Unpin for ClientRequest
impl UnsafeUnpin for ClientRequest
impl UnwindSafe for ClientRequest
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
§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].