pub trait PMProgrammatic: PMOperations {
    fn install(&mut self, prj: Self::Project) -> Result<(), Self::Error> { ... }
    fn uninstall<T: AsRef<str>>(
        &mut self,
        prj_name: T
    ) -> Result<(), Self::Error> { ... } fn update<T: AsRef<str>>(&self, prj_name: T) -> Result<(), Self::Error> { ... } fn restore<T: AsRef<str>>(&self, prj_name: T) -> Result<(), Self::Error> { ... } fn edit<T: AsRef<str>>(
        &mut self,
        prj_name: T,
        prj: Self::Project
    ) -> Result<(), Self::Error> { ... } fn get_one<T: AsRef<str>>(&self, prj_name: T) -> Option<&Self::Project> { ... } fn get_all(&self) -> Vec<&Self::Project> { ... } }
Expand description

A trait that implement the six tasks based on the PMOperations trait. It is designed for programtic use of the project

Provided Methods§

Install a project from a known Project in which all parameters are known

Errors
  • If there is a project with that name or directory already in use -> CommonPMErrors::AlreadyExisting
  • Switching branches
  • Moving dirs
  • Adding to the store
  • Building the project

Uninstall a project given it’s name

Errors
  • Unable to get the project -> CommonPMErrors::NonExisting
  • Unable to run the uninstall script
  • Unable to delete directories -> Normally permissions errors.
  • Unable to remove from store.

Update a project given it’s name

Errors
  • Unable to get the project -> CommonPMErrors::NonExisting
  • Unable to copy directories
  • Unable to open the repo
  • Unable to switch to the established branch
  • Unable to update the repo
  • Unable to move the project
  • Unable to build the project

Install the older version of a project given it’s name

Errors
  • Unable to get the project -> CommonPMErrors::NonExisting
  • Unable to remove the src directory
  • Unable to copy the directory from old to new
  • Unable to build the project

Substitute the contents of a project with name prj_name with the contents in prj

Errors
  • Store error getting the project or substituting it.

Get the project configuration, given it’s name

Get a list of references to all the projects in storage

Implementors§