aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/repository/writable_repository_interface.rs
blob: 7a5050663a859677dca815112cdccfbb26b57630 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//! ref: composer/src/Composer/Repository/WritableRepositoryInterface.php

use crate::installer::InstallationManager;
use crate::package::PackageInterfaceHandle;
use crate::repository::RepositoryInterface;

pub trait WritableRepositoryInterface: RepositoryInterface {
    fn write(
        &mut self,
        dev_mode: bool,
        installation_manager: &mut InstallationManager,
    ) -> anyhow::Result<()>;

    fn add_package(&mut self, package: PackageInterfaceHandle) -> anyhow::Result<()>;

    fn remove_package(&mut self, package: PackageInterfaceHandle) -> anyhow::Result<()>;

    fn get_canonical_packages(&mut self) -> anyhow::Result<Vec<PackageInterfaceHandle>>;

    fn reload(&mut self) -> anyhow::Result<()>;

    fn set_dev_package_names(&mut self, dev_package_names: Vec<String>);

    fn get_dev_package_names(&self) -> &Vec<String>;
}