Skip to main content

AgentCardProducer

Trait AgentCardProducer 

Source
pub trait AgentCardProducer:
    Send
    + Sync
    + 'static {
    // Required method
    fn produce<'a>(
        &'a self,
    ) -> Pin<Box<dyn Future<Output = Result<AgentCard, A2aError>> + Send + 'a>>;
}
Expand description

Trait for producing an AgentCard dynamically.

Object-safe; used behind Arc<dyn AgentCardProducer> or as a generic bound.

Required Methods§

Source

fn produce<'a>( &'a self, ) -> Pin<Box<dyn Future<Output = Result<AgentCard, A2aError>> + Send + 'a>>

Produces an AgentCard for the current request.

§Errors

Returns an A2aError if card generation fails.

Implementors§