Skip to main content

ModelRpc

Trait ModelRpc 

Source
pub trait ModelRpc: Send + Sync {
    type Ttt: TttRpc;
    type Adapter: AdapterRpc;
    type Infer: InferRpc;
    type Fs: ModelFsRpc;

    // Required methods
    fn ttt(&self, model_ref: &str) -> Self::Ttt;
    fn adapter(&self, model_ref: &str) -> Self::Adapter;
    fn infer(&self, model_ref: &str) -> Self::Infer;
    fn fs(&self, model_ref: &str) -> Self::Fs;
    fn load<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request: &'life1 LoadModelRequest,
    ) -> Pin<Box<dyn Future<Output = Result<LoadedModelResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn unload<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request: &'life1 UnloadModelRequest,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn status<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request: &'life1 StatusRequest,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ModelStatusEntry>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn health_check<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<ModelHealthStatus>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generated RPC trait for the Model service.

Required Associated Types§

Required Methods§

Source

fn ttt(&self, model_ref: &str) -> Self::Ttt

Source

fn adapter(&self, model_ref: &str) -> Self::Adapter

Source

fn infer(&self, model_ref: &str) -> Self::Infer

Source

fn fs(&self, model_ref: &str) -> Self::Fs

Source

fn load<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 LoadModelRequest, ) -> Pin<Box<dyn Future<Output = Result<LoadedModelResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn unload<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 UnloadModelRequest, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn status<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 StatusRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<ModelStatusEntry>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn health_check<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ModelHealthStatus>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§