pub trait AgentMessageHandler: Send + Sync {
// Provided methods
fn handle_agent_register<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn handle_agent_discover<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn handle_agent_heartbeat<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn handle_call<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn handle_response<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn handle_event<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn handle_stream_open<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn handle_stream_chunk<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn handle_stream_close<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn handle_ack<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn handle_error<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn handle_unhandled<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
message_type: MessageType,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Trait implemented by agent-specific MXP message handlers.
Provided Methods§
Sourcefn handle_agent_register<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_agent_register<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called for AgentRegister messages.
Sourcefn handle_agent_discover<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_agent_discover<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called for AgentDiscover messages.
Sourcefn handle_agent_heartbeat<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_agent_heartbeat<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called for AgentHeartbeat messages.
Sourcefn handle_call<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_call<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called for Call messages.
Sourcefn handle_response<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_response<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called for Response messages.
Sourcefn handle_event<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_event<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called for Event messages.
Sourcefn handle_stream_open<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_stream_open<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called for StreamOpen messages.
Sourcefn handle_stream_chunk<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_stream_chunk<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called for StreamChunk messages.
Sourcefn handle_stream_close<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_stream_close<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called for StreamClose messages.
Sourcefn handle_ack<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_ack<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called for Ack messages.
Sourcefn handle_error<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_error<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called for protocol-level error responses.
Sourcefn handle_unhandled<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
message_type: MessageType,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_unhandled<'life0, 'async_trait>(
&'life0 self,
ctx: HandlerContext,
message_type: MessageType,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fallback invoked when a specialized handler is not implemented.