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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§