pub struct Workspace { /* private fields */ }Implementations§
Source§impl Workspace
impl Workspace
pub fn new() -> Result<Self>
pub fn set_root_dir<P: Into<PathBuf>>(&mut self, root: P)
pub fn verbose_output(self, verbose: bool) -> Self
pub fn print(&self, args: Arguments<'_>)
Sourcepub fn repositories(&self) -> Option<&[Repository]>
pub fn repositories(&self) -> Option<&[Repository]>
Returns a list of managed repositories. Note that this method returns None if cache has not created yet.
pub fn config(&self) -> &Config
pub fn import_repositories<P: AsRef<Path>>( &mut self, root: P, depth: Option<usize>, ) -> Result<()>
pub fn add_repository(&mut self, repo: Repository)
pub fn add_repository_if_exists(&mut self, path: &Path) -> Result<()>
pub fn drop_invalid_repositories(&mut self)
pub fn sort_repositories(&mut self)
Sourcepub fn save_cache(&mut self) -> Result<()>
pub fn save_cache(&mut self) -> Result<()>
Save current state of workspace to cache file.
pub fn resolve_query(&self, query: &Query) -> Result<PathBuf>
pub fn default_host(&self) -> &str
pub fn for_each_repo<F: Fn(&Repository) -> Result<()>>( &self, f: F, ) -> Result<()>
pub fn create_empty_repository(&mut self, path: &Path, vcs: Vcs) -> Result<()>
pub fn clone_repository( &mut self, remote: Remote, dest: &Path, vcs: Vcs, ) -> Result<()>
Auto Trait Implementations§
impl Freeze for Workspace
impl RefUnwindSafe for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin for Workspace
impl UnwindSafe for Workspace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more