diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-22 23:14:27 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-23 15:48:00 +0900 |
| commit | 5adc4e467f01865ba2d4f519334ee1b0496b8ebf (patch) | |
| tree | f6970f181793c0f8b9b67b2af54c09ae13a25c4b /crates/shirabe/src/installer/installer_interface.rs | |
| parent | 2a1696906344cb4da768a940bf8b1f89bbc82b47 (diff) | |
| download | php-shirabe-5adc4e467f01865ba2d4f519334ee1b0496b8ebf.tar.gz php-shirabe-5adc4e467f01865ba2d4f519334ee1b0496b8ebf.tar.zst php-shirabe-5adc4e467f01865ba2d4f519334ee1b0496b8ebf.zip | |
refactor(promise): change functions returning PromiseInterface to async fn
Diffstat (limited to 'crates/shirabe/src/installer/installer_interface.rs')
| -rw-r--r-- | crates/shirabe/src/installer/installer_interface.rs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/crates/shirabe/src/installer/installer_interface.rs b/crates/shirabe/src/installer/installer_interface.rs index 5370364..29171cf 100644 --- a/crates/shirabe/src/installer/installer_interface.rs +++ b/crates/shirabe/src/installer/installer_interface.rs @@ -2,7 +2,7 @@ use crate::package::PackageInterface; use crate::repository::InstalledRepositoryInterface; -use shirabe_external_packages::react::promise::PromiseInterface; +use shirabe_php_shim::PhpMixed; pub trait InstallerInterface: std::fmt::Debug { fn supports(&self, package_type: &str) -> bool; @@ -13,44 +13,44 @@ pub trait InstallerInterface: std::fmt::Debug { package: &dyn PackageInterface, ) -> bool; - fn download( + async fn download( &self, package: &dyn PackageInterface, prev_package: Option<&dyn PackageInterface>, - ) -> anyhow::Result<Option<Box<dyn PromiseInterface>>>; + ) -> anyhow::Result<Option<PhpMixed>>; - fn prepare( + async fn prepare( &self, r#type: &str, package: &dyn PackageInterface, prev_package: Option<&dyn PackageInterface>, - ) -> anyhow::Result<Option<Box<dyn PromiseInterface>>>; + ) -> anyhow::Result<Option<PhpMixed>>; - fn install( + async fn install( &mut self, repo: &mut dyn InstalledRepositoryInterface, package: &dyn PackageInterface, - ) -> anyhow::Result<Option<Box<dyn PromiseInterface>>>; + ) -> anyhow::Result<Option<PhpMixed>>; - fn update( + async fn update( &mut self, repo: &mut dyn InstalledRepositoryInterface, initial: &dyn PackageInterface, target: &dyn PackageInterface, - ) -> anyhow::Result<Option<Box<dyn PromiseInterface>>>; + ) -> anyhow::Result<Option<PhpMixed>>; - fn uninstall( + async fn uninstall( &mut self, repo: &mut dyn InstalledRepositoryInterface, package: &dyn PackageInterface, - ) -> anyhow::Result<Option<Box<dyn PromiseInterface>>>; + ) -> anyhow::Result<Option<PhpMixed>>; - fn cleanup( + async fn cleanup( &self, r#type: &str, package: &dyn PackageInterface, prev_package: Option<&dyn PackageInterface>, - ) -> anyhow::Result<Option<Box<dyn PromiseInterface>>>; + ) -> anyhow::Result<Option<PhpMixed>>; fn get_install_path(&self, package: &dyn PackageInterface) -> Option<String>; |
