pub trait ApiService: Send + Sync {
// Required methods
fn create_thread<'life0, 'async_trait>(
&'life0 self,
preferred_id: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<ThreadView, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_thread<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ThreadView, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn submit_interaction<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
request: InteractionSubmitRequest,
) -> Pin<Box<dyn Future<Output = Result<InteractionSubmitResponse, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn query_history<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<HistoryEventView>, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn subscribe_events<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Receiver<Event>, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Required Methods§
fn create_thread<'life0, 'async_trait>(
&'life0 self,
preferred_id: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<ThreadView, ApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_thread<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ThreadView, ApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn submit_interaction<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
request: InteractionSubmitRequest,
) -> Pin<Box<dyn Future<Output = Result<InteractionSubmitResponse, ApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_history<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<HistoryEventView>, ApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn subscribe_events<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Receiver<Event>, ApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".