pub struct ClawHubClient { /* private fields */ }Expand description
ClawHub API client.
Implementations§
Source§impl ClawHubClient
impl ClawHubClient
Sourcepub fn new(base_url: Option<String>) -> Result<Self>
pub fn new(base_url: Option<String>) -> Result<Self>
Create a new client targeting the given base URL, or the public
ClawHub registry if base_url is None.
Sourcepub async fn search_skills(
&self,
query: &str,
limit: Option<usize>,
) -> Result<Vec<ClawHubSearchResult>>
pub async fn search_skills( &self, query: &str, limit: Option<usize>, ) -> Result<Vec<ClawHubSearchResult>>
Search for skills by query string.
Sourcepub async fn get_skill(&self, slug: &str) -> Result<ClawHubSkillDetail>
pub async fn get_skill(&self, slug: &str) -> Result<ClawHubSkillDetail>
Fetch full detail for a skill by slug.
Sourcepub async fn download_skill(
&self,
slug: &str,
version: Option<&str>,
) -> Result<DownloadedArchive>
pub async fn download_skill( &self, slug: &str, version: Option<&str>, ) -> Result<DownloadedArchive>
Download a skill archive (zip) returning the temp file path and sha256.
Trait Implementations§
Source§impl Clone for ClawHubClient
impl Clone for ClawHubClient
Source§fn clone(&self) -> ClawHubClient
fn clone(&self) -> ClawHubClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ClawHubClient
impl !UnwindSafe for ClawHubClient
impl Freeze for ClawHubClient
impl Send for ClawHubClient
impl Sync for ClawHubClient
impl Unpin for ClawHubClient
impl UnsafeUnpin for ClawHubClient
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