pub trait AgentBackend: Send + Sync {
// Required methods
fn id(&self) -> &'static str;
fn connect<'life0, 'async_trait>(
&'life0 self,
start: BackendStart,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AgentBackendSession>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_threads<'life0, 'async_trait>(
&'life0 self,
cwd: PathBuf,
limit: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<BackendThreadSummary>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_models<'life0, 'async_trait>(
&'life0 self,
cwd: PathBuf,
) -> Pin<Box<dyn Future<Output = Result<Vec<BackendModel>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
fn id(&self) -> &'static str
fn connect<'life0, 'async_trait>(
&'life0 self,
start: BackendStart,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AgentBackendSession>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_threads<'life0, 'async_trait>(
&'life0 self,
cwd: PathBuf,
limit: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<BackendThreadSummary>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_models<'life0, 'async_trait>(
&'life0 self,
cwd: PathBuf,
) -> Pin<Box<dyn Future<Output = Result<Vec<BackendModel>>> + 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".