pub struct ToolCache { /* private fields */ }Expand description
Tool cache manager
Manages cached tool installations in ~/.local/share/rx/tools/
Implementations§
Source§impl ToolCache
impl ToolCache
Sourcepub fn get(&self, package: &str) -> Option<CachedTool>
pub fn get(&self, package: &str) -> Option<CachedTool>
Get a cached tool by package name
Sourcepub fn prepare(&self, package: &str) -> Result<PathBuf>
pub fn prepare(&self, package: &str) -> Result<PathBuf>
Store a tool in the cache
Returns the path where the venv should be created
Sourcepub fn record_version(&self, package: &str, version: &str) -> Result<()>
pub fn record_version(&self, package: &str, version: &str) -> Result<()>
Record the installed version for a tool
Sourcepub fn list(&self) -> Result<Vec<CachedTool>>
pub fn list(&self) -> Result<Vec<CachedTool>>
List all cached tools
Auto Trait Implementations§
impl Freeze for ToolCache
impl RefUnwindSafe for ToolCache
impl Send for ToolCache
impl Sync for ToolCache
impl Unpin for ToolCache
impl UnwindSafe for ToolCache
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