pub struct GoManager {}Implementations§
Source§impl GoManager
impl GoManager
pub fn new() -> Self
Sourcepub fn extract_archive(
&self,
archive_path: &Path,
extract_to: &Path,
) -> Result<()>
pub fn extract_archive( &self, archive_path: &Path, extract_to: &Path, ) -> Result<()>
Extract archive to specified directory
Sourcepub fn switch_version(&self, version: &str, base_dir: &Path) -> Result<()>
pub fn switch_version(&self, version: &str, base_dir: &Path) -> Result<()>
Switch to a specific Go version
Sourcepub fn get_current_version(&self, base_dir: &Path) -> Option<String>
pub fn get_current_version(&self, base_dir: &Path) -> Option<String>
Get current version
Sourcepub fn get_link_target(&self, base_dir: &Path) -> Option<PathBuf>
pub fn get_link_target(&self, base_dir: &Path) -> Option<PathBuf>
Get symlink target
Sourcepub fn get_symlink_info(&self, base_dir: &Path) -> String
pub fn get_symlink_info(&self, base_dir: &Path) -> String
Get symlink information
Sourcepub async fn install(&self, request: InstallRequest) -> Result<GoVersionInfo>
pub async fn install(&self, request: InstallRequest) -> Result<GoVersionInfo>
Install Go version
Sourcepub fn switch_to(&self, request: SwitchRequest) -> Result<()>
pub fn switch_to(&self, request: SwitchRequest) -> Result<()>
Switch to a version
Sourcepub fn uninstall(&self, request: UninstallRequest) -> Result<()>
pub fn uninstall(&self, request: UninstallRequest) -> Result<()>
Uninstall a version
Sourcepub fn list_installed(
&self,
request: ListInstalledRequest,
) -> Result<VersionList>
pub fn list_installed( &self, request: ListInstalledRequest, ) -> Result<VersionList>
List installed versions
Sourcepub fn list_available(&self) -> Result<VersionList>
pub fn list_available(&self) -> Result<VersionList>
List available versions
Sourcepub fn status(&self, request: StatusRequest) -> Result<RuntimeStatus>
pub fn status(&self, request: StatusRequest) -> Result<RuntimeStatus>
Get status
Sourcepub fn get_version_info(
&self,
version: &str,
install_dir: &Path,
cache_dir: &Path,
) -> Result<GoVersionInfo>
pub fn get_version_info( &self, version: &str, install_dir: &Path, cache_dir: &Path, ) -> Result<GoVersionInfo>
Get version info
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GoManager
impl RefUnwindSafe for GoManager
impl Send for GoManager
impl Sync for GoManager
impl Unpin for GoManager
impl UnsafeUnpin for GoManager
impl UnwindSafe for GoManager
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