Skip to main content

ServingController

Trait ServingController 

Source
pub trait ServingController: Send + Sync {
    // Required methods
    fn load<'a>(
        &'a self,
        request: LoadModelRequest,
    ) -> Pin<Box<dyn Future<Output = Result<ServedModel, Error>> + Send + 'a>>;
    fn unload<'a>(
        &'a self,
        request: UnloadModelRequest,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>>;
    fn served_models<'a>(
        &'a self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ServedModel>, Error>> + Send + 'a>>;
    fn status<'a>(
        &'a self,
    ) -> Pin<Box<dyn Future<Output = Result<ServingStatus, Error>> + Send + 'a>>;
    fn set_device_policy<'a>(
        &'a self,
        policy: DevicePolicy,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>>;
}

Required Methods§

Source

fn load<'a>( &'a self, request: LoadModelRequest, ) -> Pin<Box<dyn Future<Output = Result<ServedModel, Error>> + Send + 'a>>

Source

fn unload<'a>( &'a self, request: UnloadModelRequest, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>>

Source

fn served_models<'a>( &'a self, ) -> Pin<Box<dyn Future<Output = Result<Vec<ServedModel>, Error>> + Send + 'a>>

Source

fn status<'a>( &'a self, ) -> Pin<Box<dyn Future<Output = Result<ServingStatus, Error>> + Send + 'a>>

Source

fn set_device_policy<'a>( &'a self, policy: DevicePolicy, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§