pub struct IntelClient { /* private fields */ }Expand description
Client for fetching live dependency intelligence.
Implementations§
Source§impl IntelClient
impl IntelClient
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Create a new IntelClient with crates.io API access and disk cache.
Sourcepub fn fetch_crate_intel(&self, name: &str) -> Result<CrateIntel>
pub fn fetch_crate_intel(&self, name: &str) -> Result<CrateIntel>
Fetch live intel for a crate. Checks disk cache first (1hr TTL).
Sourcepub fn fetch_github_activity(&self, repo_url: &str) -> Option<GitHubActivity>
pub fn fetch_github_activity(&self, repo_url: &str) -> Option<GitHubActivity>
Fetch GitHub activity for a repository URL. Returns None if the URL is not a GitHub URL or if the fetch fails.
Sourcepub fn fetch_bulk_intel(
&self,
crate_names: &[&str],
) -> HashMap<String, CrateIntel>
pub fn fetch_bulk_intel( &self, crate_names: &[&str], ) -> HashMap<String, CrateIntel>
Fetch intel for all unique crate names, returning what we can get. Failures for individual crates are silently skipped.
Auto Trait Implementations§
impl !Freeze for IntelClient
impl !RefUnwindSafe for IntelClient
impl Send for IntelClient
impl Sync for IntelClient
impl Unpin for IntelClient
impl UnsafeUnpin for IntelClient
impl !UnwindSafe for IntelClient
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