You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
866 B
31 lines
866 B
// use std::sync::Arc; |
|
|
|
// use applib::DictImporter; |
|
// use applib::DictRepository; |
|
// use applib::SqliteDictRepository; |
|
// use applib::SystemDecoder; |
|
// use applib::SystemEncoder; |
|
// use applib::sys_major as major; |
|
|
|
#[derive(Clone)] |
|
pub struct Container; |
|
|
|
impl Container { |
|
pub async fn new() -> anyhow::Result<Self> { |
|
Ok(Self) |
|
} |
|
|
|
// pub async fn create_dict_importer(&self, dict_name: &str) -> anyhow::Result<DictImporter> { |
|
// let repo = self.create_dict_repo(dict_name).await?; |
|
// Ok(DictImporter::new(repo)) |
|
// } |
|
|
|
// pub async fn create_dict_repo( |
|
// &self, |
|
// dict_name: &str, |
|
// ) -> anyhow::Result<Arc<dyn DictRepository>> { |
|
// let mut dict_repo = SqliteDictRepository::new("sqlite:app.db").await?; |
|
// dict_repo.use_dict(dict_name); |
|
// Ok(Arc::new(dict_repo)) |
|
// } |
|
}
|
|
|