diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-28 22:43:11 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-28 22:43:43 +0900 |
| commit | eea4efe87e455742ec17881ee93d8095925e8516 (patch) | |
| tree | 6d242f4fdd0bf32f0494a6fbbd62bce9ed6e1dc7 /crates/shirabe/src/repository/repository_interface.rs | |
| parent | cc5d73c05a0abca2eebcc8a6afa0b1543ee49850 (diff) | |
| download | php-shirabe-eea4efe87e455742ec17881ee93d8095925e8516.tar.gz php-shirabe-eea4efe87e455742ec17881ee93d8095925e8516.tar.zst php-shirabe-eea4efe87e455742ec17881ee93d8095925e8516.zip | |
refactor(repository): introduce Rc<RefCell<_>> handles for repositories
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/repository/repository_interface.rs')
| -rw-r--r-- | crates/shirabe/src/repository/repository_interface.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/shirabe/src/repository/repository_interface.rs b/crates/shirabe/src/repository/repository_interface.rs index 316f509..21914f6 100644 --- a/crates/shirabe/src/repository/repository_interface.rs +++ b/crates/shirabe/src/repository/repository_interface.rs @@ -93,8 +93,23 @@ pub trait RepositoryInterface: Countable + std::fmt::Debug { None } + fn as_installed_repository_interface_mut( + &mut self, + ) -> Option<&mut dyn crate::repository::InstalledRepositoryInterface> { + None + } + fn as_any(&self) -> &dyn std::any::Any; + /// Injects this repository's own weak handle so that `add_package` can wire package -> + /// repository back-references (PHP `setRepository($this)`). Called once when the repository is + /// wrapped in a [`RepositoryInterfaceHandle`](crate::repository::RepositoryInterfaceHandle). + /// Wrapper repositories forward the same weak (the outermost handle) to their inner + /// `ArrayRepository`. + fn set_self_handle(&self, weak: crate::repository::RepositoryInterfaceWeakHandle) { + let _ = weak; + } + fn clone_box(&self) -> Box<dyn RepositoryInterface> { todo!() } |
