openai_agents_rust/extensions.rs
1use crate::error::AgentError;
2
3/// Trait for optional extensions that can be loaded at runtime.
4pub trait Extension: Send + Sync {
5 /// Human‑readable name of the extension.
6 fn name(&self) -> &str;
7
8 /// Initialise the extension with access to configuration and client.
9 fn init(&self, config: &crate::config::Config) -> Result<(), AgentError>;
10}