pub trait InstalledModelRepository<DB: Database>: DatabaseRepository<DB> {
// Required methods
fn get_all_installed_models<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<InstalledModel>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_installed_model_by_model_id<'life0, 'async_trait>(
&'life0 self,
model_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<InstalledModel>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn install_model<'life0, 'life1, 'async_trait>(
&'life0 self,
installed_model: &'life1 InstalledModel,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_installed_model<'life0, 'life1, 'async_trait>(
&'life0 self,
installed_model: &'life1 InstalledModel,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn uninstall_model<'life0, 'async_trait>(
&'life0 self,
model_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_installed_models_by_status<'life0, 'life1, 'async_trait>(
&'life0 self,
status: &'life1 ModelStatus,
) -> Pin<Box<dyn Future<Output = Result<Vec<InstalledModel>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_model_usage<'life0, 'async_trait>(
&'life0 self,
model_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
已安装模型数据库仓库
Required Methods§
Sourcefn get_all_installed_models<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<InstalledModel>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all_installed_models<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<InstalledModel>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
获取所有已安装模型
Sourcefn get_installed_model_by_model_id<'life0, 'async_trait>(
&'life0 self,
model_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<InstalledModel>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_installed_model_by_model_id<'life0, 'async_trait>(
&'life0 self,
model_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<InstalledModel>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
根据模型ID获取已安装模型
Sourcefn install_model<'life0, 'life1, 'async_trait>(
&'life0 self,
installed_model: &'life1 InstalledModel,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn install_model<'life0, 'life1, 'async_trait>(
&'life0 self,
installed_model: &'life1 InstalledModel,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
安装模型
Sourcefn update_installed_model<'life0, 'life1, 'async_trait>(
&'life0 self,
installed_model: &'life1 InstalledModel,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_installed_model<'life0, 'life1, 'async_trait>(
&'life0 self,
installed_model: &'life1 InstalledModel,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
更新已安装模型
Sourcefn uninstall_model<'life0, 'async_trait>(
&'life0 self,
model_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn uninstall_model<'life0, 'async_trait>(
&'life0 self,
model_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
卸载模型
Sourcefn get_installed_models_by_status<'life0, 'life1, 'async_trait>(
&'life0 self,
status: &'life1 ModelStatus,
) -> Pin<Box<dyn Future<Output = Result<Vec<InstalledModel>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_installed_models_by_status<'life0, 'life1, 'async_trait>(
&'life0 self,
status: &'life1 ModelStatus,
) -> Pin<Box<dyn Future<Output = Result<Vec<InstalledModel>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
按状态获取已安装模型