pub trait AgentHandler<Cx = RequestContext>:
Send
+ Sync
+ 'static {
// Required methods
fn list_agents<'life0, 'async_trait>(
&'life0 self,
request: ListAgentsRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<ListAgentsResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_agent<'life0, 'async_trait>(
&'life0 self,
request: CreateAgentRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Agent>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_agent<'life0, 'async_trait>(
&'life0 self,
request: GetAgentRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Agent>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update_agent<'life0, 'async_trait>(
&'life0 self,
request: UpdateAgentRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Agent>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_agent<'life0, 'async_trait>(
&'life0 self,
request: DeleteAgentRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
Sourcefn list_agents<'life0, 'async_trait>(
&'life0 self,
request: ListAgentsRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<ListAgentsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_agents<'life0, 'async_trait>(
&'life0 self,
request: ListAgentsRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<ListAgentsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists agents.
fn create_agent<'life0, 'async_trait>(
&'life0 self,
request: CreateAgentRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Agent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_agent<'life0, 'async_trait>(
&'life0 self,
request: GetAgentRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Agent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_agent<'life0, 'async_trait>(
&'life0 self,
request: UpdateAgentRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Agent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_agent<'life0, 'async_trait>(
&'life0 self,
request: DeleteAgentRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".