Skip to main content

Client

Trait Client 

Source
pub trait Client<CTXEXT> {
    // Required methods
    fn create_unary<'life0, 'async_trait>(
        &'life0 self,
        ctx: Context<CTXEXT>,
        request: Arc<Request>,
    ) -> Pin<Box<dyn Future<Output = Result<FunctionProfileComputation, ResponseError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_streaming<'life0, 'async_trait>(
        &'life0 self,
        ctx: Context<CTXEXT>,
        request: Arc<Request>,
    ) -> Pin<Box<dyn Future<Output = Result<impl Stream<Item = Result<FunctionProfileComputationChunk, ResponseError>> + Send + 'static, ResponseError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Client for computing (training) Profiles.

Required Methods§

Source

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

Computes a Profile and returns the complete result.

Source

fn create_streaming<'life0, 'async_trait>( &'life0 self, ctx: Context<CTXEXT>, request: Arc<Request>, ) -> Pin<Box<dyn Future<Output = Result<impl Stream<Item = Result<FunctionProfileComputationChunk, ResponseError>> + Send + 'static, ResponseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Computes a Profile with streaming progress updates.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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