pub struct Workspace { /* private fields */ }
Implementations§
Source§impl Workspace
impl Workspace
pub fn new() -> Result<Self>
pub fn cache(&self) -> &Cache
pub fn config(&self) -> &Config
pub fn config_mut(&mut self) -> &mut Config
pub fn filter_repository(&self, repository: &Repository) -> bool
pub fn repositories(&self) -> Vec<&Repository>
Sourcepub fn add_repository(&mut self, repository: Repository) -> Result<()>
pub fn add_repository(&mut self, repository: Repository) -> Result<()>
Adds a repository to the cache Adding a repository to the cache will also write the repository to disk
Sourcepub fn add_tag(&mut self, tag: Tag) -> Result<()>
pub fn add_tag(&mut self, tag: Tag) -> Result<()>
Adds a tag to the cache
Adding a tag to the cache will also write the tag to disk
pub fn get_repository(&self, name: &str) -> Option<&Repository>
pub fn take_repository(&mut self, name: &str) -> Option<Repository>
pub fn get_tag(&mut self, name: &str) -> Option<&Tag>
pub fn take_tag(&mut self, name: &str) -> Option<Tag>
pub fn has_repository(&self, name: &str) -> bool
pub fn has_tag(&self, name: &str) -> bool
pub fn remove_repository(&mut self, name: &str) -> Result<()>
pub fn remove_tag(&mut self, name: &str) -> Result<()>
pub fn update_remotes(&self, repository: &Repository) -> Result<()>
pub fn write_repository(&self, repository: &Repository) -> Result<()>
pub fn write_tag(&self, tag: &Tag) -> Result<()>
Trait Implementations§
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