pub struct DefaultRequestProcessor<M, T, N, A = SimpleAgentInfo>where
M: AsyncMessageHandler + Send + Sync + 'static,
T: AsyncTaskManager + Send + Sync + 'static,
N: AsyncNotificationManager + Send + Sync + 'static,
A: AgentInfoProvider + Send + Sync + 'static,{ /* private fields */ }Expand description
Default implementation of a request processor that routes requests to business handlers
Implementations§
Source§impl<M, T, N, A> DefaultRequestProcessor<M, T, N, A>where
M: AsyncMessageHandler + Send + Sync + 'static,
T: AsyncTaskManager + Send + Sync + 'static,
N: AsyncNotificationManager + Send + Sync + 'static,
A: AgentInfoProvider + Send + Sync + 'static,
impl<M, T, N, A> DefaultRequestProcessor<M, T, N, A>where
M: AsyncMessageHandler + Send + Sync + 'static,
T: AsyncTaskManager + Send + Sync + 'static,
N: AsyncNotificationManager + Send + Sync + 'static,
A: AgentInfoProvider + Send + Sync + 'static,
Source§impl<H, A> DefaultRequestProcessor<H, H, H, A>where
H: AsyncMessageHandler + AsyncTaskManager + AsyncNotificationManager + Send + Sync + 'static,
A: AgentInfoProvider + Send + Sync + 'static,
impl<H, A> DefaultRequestProcessor<H, H, H, A>where
H: AsyncMessageHandler + AsyncTaskManager + AsyncNotificationManager + Send + Sync + 'static,
A: AgentInfoProvider + Send + Sync + 'static,
Sourcepub fn with_handler(handler: H, agent_info: A) -> Self
pub fn with_handler(handler: H, agent_info: A) -> Self
Create a new request processor with a single handler that implements all traits
Trait Implementations§
Source§impl<M, T, N, A> AsyncA2ARequestProcessor for DefaultRequestProcessor<M, T, N, A>where
M: AsyncMessageHandler + Send + Sync + 'static,
T: AsyncTaskManager + Send + Sync + 'static,
N: AsyncNotificationManager + Send + Sync + 'static,
A: AgentInfoProvider + Send + Sync + 'static,
impl<M, T, N, A> AsyncA2ARequestProcessor for DefaultRequestProcessor<M, T, N, A>where
M: AsyncMessageHandler + Send + Sync + 'static,
T: AsyncTaskManager + Send + Sync + 'static,
N: AsyncNotificationManager + Send + Sync + 'static,
A: AgentInfoProvider + Send + Sync + 'static,
Source§fn process_raw_request<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, A2AError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process_raw_request<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, A2AError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Process a raw JSON-RPC request string
Source§fn process_request<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 A2ARequest,
) -> Pin<Box<dyn Future<Output = Result<JSONRPCResponse, A2AError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process_request<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 A2ARequest,
) -> Pin<Box<dyn Future<Output = Result<JSONRPCResponse, A2AError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Process a parsed A2A request
Source§impl<M, T, N, A> Clone for DefaultRequestProcessor<M, T, N, A>where
M: AsyncMessageHandler + Send + Sync + 'static + Clone,
T: AsyncTaskManager + Send + Sync + 'static + Clone,
N: AsyncNotificationManager + Send + Sync + 'static + Clone,
A: AgentInfoProvider + Send + Sync + 'static + Clone,
impl<M, T, N, A> Clone for DefaultRequestProcessor<M, T, N, A>where
M: AsyncMessageHandler + Send + Sync + 'static + Clone,
T: AsyncTaskManager + Send + Sync + 'static + Clone,
N: AsyncNotificationManager + Send + Sync + 'static + Clone,
A: AgentInfoProvider + Send + Sync + 'static + Clone,
Source§fn clone(&self) -> DefaultRequestProcessor<M, T, N, A>
fn clone(&self) -> DefaultRequestProcessor<M, T, N, A>
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<M, T, N, A> Freeze for DefaultRequestProcessor<M, T, N, A>
impl<M, T, N, A> RefUnwindSafe for DefaultRequestProcessor<M, T, N, A>
impl<M, T, N, A> Send for DefaultRequestProcessor<M, T, N, A>
impl<M, T, N, A> Sync for DefaultRequestProcessor<M, T, N, A>
impl<M, T, N, A> Unpin for DefaultRequestProcessor<M, T, N, A>
impl<M, T, N, A> UnsafeUnpin for DefaultRequestProcessor<M, T, N, A>
impl<M, T, N, A> UnwindSafe for DefaultRequestProcessor<M, T, N, A>
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