pub struct CrateClient { /* private fields */ }
Expand description
HTTP client for crates.io API interactions
Implementations§
Source§impl CrateClient
impl CrateClient
Sourcepub fn builder() -> CrateClientBuilder
pub fn builder() -> CrateClientBuilder
Create a new client builder
Sourcepub async fn crate_exists(&self, crate_name: &str) -> Result<bool>
pub async fn crate_exists(&self, crate_name: &str) -> Result<bool>
Check if a specific crate exists on crates.io
Sourcepub async fn get_latest_version(&self, crate_name: &str) -> Result<String>
pub async fn get_latest_version(&self, crate_name: &str) -> Result<String>
Get the latest version of a crate
Sourcepub async fn get_crate_info(&self, crate_name: &str) -> Result<CrateInfo>
pub async fn get_crate_info(&self, crate_name: &str) -> Result<CrateInfo>
Get detailed information about a crate
Sourcepub async fn get_all_versions(&self, crate_name: &str) -> Result<Vec<Version>>
pub async fn get_all_versions(&self, crate_name: &str) -> Result<Vec<Version>>
Get all versions of a crate
Sourcepub async fn search_crates(
&self,
query: &str,
limit: Option<usize>,
) -> Result<Vec<CrateSearchResult>>
pub async fn search_crates( &self, query: &str, limit: Option<usize>, ) -> Result<Vec<CrateSearchResult>>
Search for crates by name or keywords
Sourcepub async fn get_crate_dependencies(
&self,
crate_name: &str,
version: &str,
) -> Result<Vec<Dependency>>
pub async fn get_crate_dependencies( &self, crate_name: &str, version: &str, ) -> Result<Vec<Dependency>>
Get dependencies for a specific crate version
Sourcepub async fn get_download_stats(
&self,
crate_name: &str,
) -> Result<DownloadStats>
pub async fn get_download_stats( &self, crate_name: &str, ) -> Result<DownloadStats>
Get download statistics for a crate
Sourcepub async fn check_crate_status(&self, crate_name: &str) -> Result<CrateStatus>
pub async fn check_crate_status(&self, crate_name: &str) -> Result<CrateStatus>
Check the status of a crate (exists, yanked, etc.)
Sourcepub fn validate_crate_name(&self, name: &str) -> Result<()>
pub fn validate_crate_name(&self, name: &str) -> Result<()>
Validate crate name format
Sourcepub async fn process_crate_list(
&self,
crates: Vec<String>,
) -> Result<Vec<CrateCheckResult>>
pub async fn process_crate_list( &self, crates: Vec<String>, ) -> Result<Vec<CrateCheckResult>>
Process a batch of crate checks
Sourcepub async fn process_crate_version_map(
&self,
input: HashMap<String, String>,
) -> Result<BatchResult>
pub async fn process_crate_version_map( &self, input: HashMap<String, String>, ) -> Result<BatchResult>
Process a crate version map
Sourcepub async fn process_batch_operations(
&self,
operations: Vec<BatchOperation>,
) -> Result<BatchResponse>
pub async fn process_batch_operations( &self, operations: Vec<BatchOperation>, ) -> Result<BatchResponse>
Process batch operations
Trait Implementations§
Source§impl Clone for CrateClient
impl Clone for CrateClient
Source§fn clone(&self) -> CrateClient
fn clone(&self) -> CrateClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CrateClient
impl Debug for CrateClient
Auto Trait Implementations§
impl Freeze for CrateClient
impl !RefUnwindSafe for CrateClient
impl Send for CrateClient
impl Sync for CrateClient
impl Unpin for CrateClient
impl !UnwindSafe for CrateClient
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