pub struct AgentProviderClient<T> { /* private fields */ }Expand description
Implementations§
Source§impl<T> AgentProviderClient<T>where
T: GrpcService<Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> AgentProviderClient<T>where
T: GrpcService<Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AgentProviderClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<Body>, Response = Response<<T as GrpcService<Body>>::ResponseBody>>,
<T as Service<Request<Body>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn create_session(
&mut self,
request: impl IntoRequest<CreateAgentProviderSessionRequest>,
) -> Result<Response<AgentSession>, Status>
pub async fn create_session( &mut self, request: impl IntoRequest<CreateAgentProviderSessionRequest>, ) -> Result<Response<AgentSession>, Status>
Sourcepub async fn get_session(
&mut self,
request: impl IntoRequest<GetAgentProviderSessionRequest>,
) -> Result<Response<AgentSession>, Status>
pub async fn get_session( &mut self, request: impl IntoRequest<GetAgentProviderSessionRequest>, ) -> Result<Response<AgentSession>, Status>
Sourcepub async fn list_sessions(
&mut self,
request: impl IntoRequest<ListAgentProviderSessionsRequest>,
) -> Result<Response<ListAgentProviderSessionsResponse>, Status>
pub async fn list_sessions( &mut self, request: impl IntoRequest<ListAgentProviderSessionsRequest>, ) -> Result<Response<ListAgentProviderSessionsResponse>, Status>
Sourcepub async fn update_session(
&mut self,
request: impl IntoRequest<UpdateAgentProviderSessionRequest>,
) -> Result<Response<AgentSession>, Status>
pub async fn update_session( &mut self, request: impl IntoRequest<UpdateAgentProviderSessionRequest>, ) -> Result<Response<AgentSession>, Status>
Sourcepub async fn create_turn(
&mut self,
request: impl IntoRequest<CreateAgentProviderTurnRequest>,
) -> Result<Response<AgentTurn>, Status>
pub async fn create_turn( &mut self, request: impl IntoRequest<CreateAgentProviderTurnRequest>, ) -> Result<Response<AgentTurn>, Status>
Sourcepub async fn get_turn(
&mut self,
request: impl IntoRequest<GetAgentProviderTurnRequest>,
) -> Result<Response<AgentTurn>, Status>
pub async fn get_turn( &mut self, request: impl IntoRequest<GetAgentProviderTurnRequest>, ) -> Result<Response<AgentTurn>, Status>
Sourcepub async fn list_turns(
&mut self,
request: impl IntoRequest<ListAgentProviderTurnsRequest>,
) -> Result<Response<ListAgentProviderTurnsResponse>, Status>
pub async fn list_turns( &mut self, request: impl IntoRequest<ListAgentProviderTurnsRequest>, ) -> Result<Response<ListAgentProviderTurnsResponse>, Status>
Sourcepub async fn cancel_turn(
&mut self,
request: impl IntoRequest<CancelAgentProviderTurnRequest>,
) -> Result<Response<AgentTurn>, Status>
pub async fn cancel_turn( &mut self, request: impl IntoRequest<CancelAgentProviderTurnRequest>, ) -> Result<Response<AgentTurn>, Status>
Sourcepub async fn list_turn_events(
&mut self,
request: impl IntoRequest<ListAgentProviderTurnEventsRequest>,
) -> Result<Response<ListAgentProviderTurnEventsResponse>, Status>
pub async fn list_turn_events( &mut self, request: impl IntoRequest<ListAgentProviderTurnEventsRequest>, ) -> Result<Response<ListAgentProviderTurnEventsResponse>, Status>
Sourcepub async fn get_interaction(
&mut self,
request: impl IntoRequest<GetAgentProviderInteractionRequest>,
) -> Result<Response<AgentInteraction>, Status>
pub async fn get_interaction( &mut self, request: impl IntoRequest<GetAgentProviderInteractionRequest>, ) -> Result<Response<AgentInteraction>, Status>
Sourcepub async fn list_interactions(
&mut self,
request: impl IntoRequest<ListAgentProviderInteractionsRequest>,
) -> Result<Response<ListAgentProviderInteractionsResponse>, Status>
pub async fn list_interactions( &mut self, request: impl IntoRequest<ListAgentProviderInteractionsRequest>, ) -> Result<Response<ListAgentProviderInteractionsResponse>, Status>
Sourcepub async fn resolve_interaction(
&mut self,
request: impl IntoRequest<ResolveAgentProviderInteractionRequest>,
) -> Result<Response<AgentInteraction>, Status>
pub async fn resolve_interaction( &mut self, request: impl IntoRequest<ResolveAgentProviderInteractionRequest>, ) -> Result<Response<AgentInteraction>, Status>
Sourcepub async fn get_capabilities(
&mut self,
request: impl IntoRequest<GetAgentProviderCapabilitiesRequest>,
) -> Result<Response<AgentProviderCapabilities>, Status>
pub async fn get_capabilities( &mut self, request: impl IntoRequest<GetAgentProviderCapabilitiesRequest>, ) -> Result<Response<AgentProviderCapabilities>, Status>
Trait Implementations§
Source§impl<T: Clone> Clone for AgentProviderClient<T>
impl<T: Clone> Clone for AgentProviderClient<T>
Source§fn clone(&self) -> AgentProviderClient<T>
fn clone(&self) -> AgentProviderClient<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for AgentProviderClient<T>
impl<T> RefUnwindSafe for AgentProviderClient<T>where
T: RefUnwindSafe,
impl<T> Send for AgentProviderClient<T>where
T: Send,
impl<T> Sync for AgentProviderClient<T>where
T: Sync,
impl<T> Unpin for AgentProviderClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for AgentProviderClient<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for AgentProviderClient<T>where
T: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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