pub struct HttpFetcher { /* private fields */ }Expand description
Streams the package with reqwest, one chunk at a time.
The stream feature exists in this workspace for exactly this: the package
is 150-300 MB, and nothing else should sit in memory while a connection may
take minutes. Verifying it reads it in once, for seconds.
A connection that stops sending fails the download: every copy of the
package on this host waits for it. There is no limit on the whole transfer,
because a large package on a slow line is legitimately slow; only silence
fails it, reqwest’s read timeout starting over with every read. What was
written is removed by the caller, on every path out of the fetch, and it was
never going to be taken for a package: an archive is only extracted once its
digest matches.
Implementations§
Trait Implementations§
Source§impl Clone for HttpFetcher
impl Clone for HttpFetcher
Source§impl Debug for HttpFetcher
impl Debug for HttpFetcher
Source§impl Default for HttpFetcher
impl Default for HttpFetcher
Source§impl PackageFetcher for HttpFetcher
impl PackageFetcher for HttpFetcher
Auto Trait Implementations§
impl !RefUnwindSafe for HttpFetcher
impl !UnwindSafe for HttpFetcher
impl Forget for HttpFetcher
impl Freeze for HttpFetcher
impl Move for HttpFetcher
impl Send for HttpFetcher
impl Sync for HttpFetcher
impl Unpin for HttpFetcher
impl UnsafeUnpin for HttpFetcher
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