pub trait PMInteractive: PMProgrammatic {
    fn i_install<T: AsRef<str>>(&mut self, url: T) -> Result<(), Self::Error>;
    fn i_list<T: AsRef<str>, Q: AsRef<[T]>>(
        &self,
        prj_names: Q
    ) -> Result<(), Self::Error>; fn i_edit<T: AsRef<str>>(&mut self, project: T) -> Result<(), Self::Error>; fn i_update<T: AsRef<str>, Q: AsRef<[T]>>(
        &self,
        prj_names: Q
    ) -> Result<(), Self::Error>; fn i_restore<T: AsRef<str>, Q: AsRef<[T]>>(
        self,
        prj_names: Q
    ) -> Result<(), Self::Error>; fn i_uninstall<T: AsRef<str>, Q: AsRef<[T]>>(
        &mut self,
        prj_names: Q
    ) -> Result<(), Self::Error>; }
Expand description

This trait defines methods for the six tasks to be interactive, it provides none of the methods, as different implementors will bring different preferences for dependencies and ways of interacting with the user.

Required Methods§

With this function a project should be downloaded, ask for the necessary information and then build and install itself The contents could look something like:

let project : Project{
    directory : somehow_get_directory()
    url: url
    ..Default::default()
};
let (repo, git_dir) = self.download(&project)?;
let project = somehow_get_rest_of project()?;
self.switch_branch(&project, &repo)?;
self.get_mut_store()
    .add(project.clone())
    .map_err(Self::map_store_error)?;
self.mv(&project, &git_dir)?;
self.build(&project)?;
Ok(())

This function should give the available information of the projects If the list is empty it’s suggested to print all the projects information

Edit a projects information and store that

Update the projects, (Possibly a forwarding of the PMBasics update method applied to each of the projects)

Take an the last version of a project, set it as the current and build and install it (Possibly just a forwarding of the PMBasics restore method)

Uninstall a project and delete the related information that the project manager has about it. (Possibly a forwarding of the PMBasics uninstall method)

Implementors§