pub struct ClawHubInstaller { /* private fields */ }Expand description
ClawHub skill installer.
Implementations§
Source§impl ClawHubInstaller
impl ClawHubInstaller
Sourcepub fn new(
skills_dir: PathBuf,
workspace_dir: PathBuf,
base_url: Option<String>,
) -> Self
pub fn new( skills_dir: PathBuf, workspace_dir: PathBuf, base_url: Option<String>, ) -> Self
Create a new installer.
skills_dir— parent directory holding each skill subdirectory.workspace_dir— root of the workspace;.clawhub/is created here for the lockfile.
Sourcepub async fn install(
&self,
slug: &str,
version: Option<&str>,
) -> Result<InstallResult>
pub async fn install( &self, slug: &str, version: Option<&str>, ) -> Result<InstallResult>
Install a skill from ClawHub.
If version is None, the latest version is resolved from the API.
Sourcepub async fn update(&self, slug: &str) -> Result<UpdateResult>
pub async fn update(&self, slug: &str) -> Result<UpdateResult>
Update a specific installed skill to the latest version.
Sourcepub async fn update_all(&self) -> Result<Vec<UpdateResult>>
pub async fn update_all(&self) -> Result<Vec<UpdateResult>>
Update all installed ClawHub skills.
Sourcepub async fn check_updates(&self) -> Result<Vec<UpdateAvailable>>
pub async fn check_updates(&self) -> Result<Vec<UpdateAvailable>>
Check which installed skills have updates available.
Fetches skill details concurrently for lower latency.
Sourcepub fn client(&self) -> &ClawHubClient
pub fn client(&self) -> &ClawHubClient
Access the underlying ClawHub client.
Auto Trait Implementations§
impl !RefUnwindSafe for ClawHubInstaller
impl !UnwindSafe for ClawHubInstaller
impl Freeze for ClawHubInstaller
impl Send for ClawHubInstaller
impl Sync for ClawHubInstaller
impl Unpin for ClawHubInstaller
impl UnsafeUnpin for ClawHubInstaller
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