pub struct DefaultMessageHandler<T>{ /* private fields */ }Expand description
Default message handler that processes messages and delegates to task manager
Implementations§
Source§impl<T> DefaultMessageHandler<T>
impl<T> DefaultMessageHandler<T>
Trait Implementations§
Source§impl<T> AsyncMessageHandler for DefaultMessageHandler<T>
impl<T> AsyncMessageHandler for DefaultMessageHandler<T>
Source§fn process_message<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
message: &'life2 Message,
session_id: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<Task, A2AError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn process_message<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
message: &'life2 Message,
session_id: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<Task, A2AError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Process a message for a specific task
Source§fn validate_message<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 Message,
) -> Pin<Box<dyn Future<Output = Result<(), A2AError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate_message<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 Message,
) -> Pin<Box<dyn Future<Output = Result<(), A2AError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Validate a message before processing
Source§fn transform_message<'life0, 'async_trait>(
&'life0 self,
message: Message,
) -> Pin<Box<dyn Future<Output = Result<Message, A2AError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transform_message<'life0, 'async_trait>(
&'life0 self,
message: Message,
) -> Pin<Box<dyn Future<Output = Result<Message, A2AError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Transform a message before processing (e.g., for content filtering)
Source§fn handle_message_flow<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
message: Message,
session_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Task, A2AError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_message_flow<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
message: Message,
session_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Task, A2AError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle message processing with validation and transformation
Source§impl<T> Clone for DefaultMessageHandler<T>
impl<T> Clone for DefaultMessageHandler<T>
Source§fn clone(&self) -> DefaultMessageHandler<T>
fn clone(&self) -> DefaultMessageHandler<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 DefaultMessageHandler<T>
impl<T> RefUnwindSafe for DefaultMessageHandler<T>where
T: RefUnwindSafe,
impl<T> Send for DefaultMessageHandler<T>
impl<T> Sync for DefaultMessageHandler<T>
impl<T> Unpin for DefaultMessageHandler<T>
impl<T> UnsafeUnpin for DefaultMessageHandler<T>
impl<T> UnwindSafe for DefaultMessageHandler<T>where
T: RefUnwindSafe,
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