pub struct Cache { /* private fields */ }
Implementations§
Source§impl Cache
impl Cache
pub fn new() -> Result<Self>
pub fn add_repository(&mut self, repository: Repository)
pub fn add_tag(&mut self, tag: Tag)
pub fn get_repository(&self, name: &str) -> Option<&Repository>
pub fn get_repository_mut(&mut self, name: &str) -> Option<&mut Repository>
pub fn take_repository(&mut self, name: &str) -> Option<Repository>
pub fn get_tag(&self, name: &str) -> Option<&Tag>
pub fn get_tag_mut(&mut self, name: &str) -> Option<&mut Tag>
pub fn take_tag(&mut self, name: &str) -> Option<Tag>
Sourcepub fn has_repository(&self, name: &str) -> bool
pub fn has_repository(&self, name: &str) -> bool
Check if cache contains a repository with the name as a key
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 repositories(&self) -> Vec<&Repository>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cache
impl RefUnwindSafe for Cache
impl Send for Cache
impl Sync for Cache
impl Unpin for Cache
impl UnwindSafe for Cache
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