pub trait AgentHandler: Send + Sync {
// Provided methods
fn on_request_headers<'life0, 'async_trait>(
&'life0 self,
_event: RequestHeadersEvent,
) -> Pin<Box<dyn Future<Output = AgentResponse> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn on_request_body_chunk<'life0, 'async_trait>(
&'life0 self,
_event: RequestBodyChunkEvent,
) -> Pin<Box<dyn Future<Output = AgentResponse> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn on_response_headers<'life0, 'async_trait>(
&'life0 self,
_event: ResponseHeadersEvent,
) -> Pin<Box<dyn Future<Output = AgentResponse> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn on_response_body_chunk<'life0, 'async_trait>(
&'life0 self,
_event: ResponseBodyChunkEvent,
) -> Pin<Box<dyn Future<Output = AgentResponse> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn on_request_complete<'life0, 'async_trait>(
&'life0 self,
_event: RequestCompleteEvent,
) -> Pin<Box<dyn Future<Output = AgentResponse> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Trait for implementing agent logic
Provided Methods§
Sourcefn on_request_headers<'life0, 'async_trait>(
&'life0 self,
_event: RequestHeadersEvent,
) -> Pin<Box<dyn Future<Output = AgentResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_request_headers<'life0, 'async_trait>(
&'life0 self,
_event: RequestHeadersEvent,
) -> Pin<Box<dyn Future<Output = AgentResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle a request headers event
Sourcefn on_request_body_chunk<'life0, 'async_trait>(
&'life0 self,
_event: RequestBodyChunkEvent,
) -> Pin<Box<dyn Future<Output = AgentResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_request_body_chunk<'life0, 'async_trait>(
&'life0 self,
_event: RequestBodyChunkEvent,
) -> Pin<Box<dyn Future<Output = AgentResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle a request body chunk event
Sourcefn on_response_headers<'life0, 'async_trait>(
&'life0 self,
_event: ResponseHeadersEvent,
) -> Pin<Box<dyn Future<Output = AgentResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_response_headers<'life0, 'async_trait>(
&'life0 self,
_event: ResponseHeadersEvent,
) -> Pin<Box<dyn Future<Output = AgentResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle a response headers event
Sourcefn on_response_body_chunk<'life0, 'async_trait>(
&'life0 self,
_event: ResponseBodyChunkEvent,
) -> Pin<Box<dyn Future<Output = AgentResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_response_body_chunk<'life0, 'async_trait>(
&'life0 self,
_event: ResponseBodyChunkEvent,
) -> Pin<Box<dyn Future<Output = AgentResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle a response body chunk event
Sourcefn on_request_complete<'life0, 'async_trait>(
&'life0 self,
_event: RequestCompleteEvent,
) -> Pin<Box<dyn Future<Output = AgentResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_request_complete<'life0, 'async_trait>(
&'life0 self,
_event: RequestCompleteEvent,
) -> Pin<Box<dyn Future<Output = AgentResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle a request complete event