pub struct PyPiClient { /* private fields */ }Expand description
Client for querying PyPI API
Implementations§
Source§impl PyPiClient
impl PyPiClient
pub fn new(include_prerelease: bool) -> Self
pub fn with_index_url(self, url: &str) -> Self
Sourcepub async fn get_package(&self, name: &str) -> Result<PackageInfo>
pub async fn get_package(&self, name: &str) -> Result<PackageInfo>
Fetch package info from PyPI
Sourcepub async fn get_packages(
&self,
names: &[String],
progress_callback: impl Fn(usize, usize) + Send + Sync + 'static,
) -> Result<GetPackagesResult>
pub async fn get_packages( &self, names: &[String], progress_callback: impl Fn(usize, usize) + Send + Sync + 'static, ) -> Result<GetPackagesResult>
Fetch multiple packages concurrently
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PyPiClient
impl !RefUnwindSafe for PyPiClient
impl Send for PyPiClient
impl Sync for PyPiClient
impl Unpin for PyPiClient
impl !UnwindSafe for PyPiClient
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