pub struct CrateDownloader { /* private fields */ }
Expand description
The CrateDownloader
struct, responsible for downloading crate files from the internet.
This struct uses the reqwest
crate’s Client
to make HTTP requests for crate files.
Implementations§
Source§impl CrateDownloader
impl CrateDownloader
Sourcepub async fn download_crate_file(
&self,
crate_version: &CrateVersion,
) -> Result<Vec<u8>>
pub async fn download_crate_file( &self, crate_version: &CrateVersion, ) -> Result<Vec<u8>>
Asynchronously downloads a crate file from crates.io.
This method constructs the URL for the crate file based on the provided CrateVersion
and uses the internal HTTP client to download it.
Trait Implementations§
Source§impl Clone for CrateDownloader
impl Clone for CrateDownloader
Source§fn clone(&self) -> CrateDownloader
fn clone(&self) -> CrateDownloader
Returns a copy 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 CrateDownloader
impl Debug for CrateDownloader
Source§impl Default for CrateDownloader
impl Default for CrateDownloader
Source§fn default() -> CrateDownloader
fn default() -> CrateDownloader
Returns the “default value” for a type. Read more
Source§impl From<Client> for CrateDownloader
impl From<Client> for CrateDownloader
Source§impl TryFrom<ClientBuilder> for CrateDownloader
impl TryFrom<ClientBuilder> for CrateDownloader
Auto Trait Implementations§
impl Freeze for CrateDownloader
impl !RefUnwindSafe for CrateDownloader
impl Send for CrateDownloader
impl Sync for CrateDownloader
impl Unpin for CrateDownloader
impl !UnwindSafe for CrateDownloader
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