Skip to main content

Client

Trait Client 

Source
pub trait Client<CTXEXT> {
    // Required methods
    fn list<'life0, 'async_trait>(
        &'life0 self,
        ctx: Context<CTXEXT>,
    ) -> Pin<Box<dyn Future<Output = Result<ListEnsemble, ResponseError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_usage<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: Context<CTXEXT>,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<UsageEnsemble, ResponseError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for listing ensembles and retrieving usage statistics.

Required Methods§

Source

fn list<'life0, 'async_trait>( &'life0 self, ctx: Context<CTXEXT>, ) -> Pin<Box<dyn Future<Output = Result<ListEnsemble, ResponseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lists all ensembles.

Source

fn get_usage<'life0, 'life1, 'async_trait>( &'life0 self, ctx: Context<CTXEXT>, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<UsageEnsemble, ResponseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Retrieves usage statistics for an ensemble by ID.

Implementors§

Source§

impl<CTXEXT> Client<CTXEXT> for ObjectiveAiClient
where CTXEXT: Send + Sync + 'static,