pub struct SegmentedFetcher<C: HttpClient> { /* private fields */ }Expand description
Segmented fetcher implementation.
Implementations§
Source§impl<C: HttpClient + 'static> SegmentedFetcher<C>
impl<C: HttpClient + 'static> SegmentedFetcher<C>
Sourcepub fn new(client: C, workspace_root: impl Into<PathBuf>) -> Self
pub fn new(client: C, workspace_root: impl Into<PathBuf>) -> Self
Create a new segmented fetcher.
Sourcepub async fn fetch_segmented(
&self,
url: &str,
destination: &Path,
options: SegmentedOptions,
fetch_options: FetchOptions,
) -> Result<PathBuf>
pub async fn fetch_segmented( &self, url: &str, destination: &Path, options: SegmentedOptions, fetch_options: FetchOptions, ) -> Result<PathBuf>
Fetch a file using segmented downloads.
Auto Trait Implementations§
impl<C> Freeze for SegmentedFetcher<C>
impl<C> RefUnwindSafe for SegmentedFetcher<C>where
C: RefUnwindSafe,
impl<C> Send for SegmentedFetcher<C>
impl<C> Sync for SegmentedFetcher<C>
impl<C> Unpin for SegmentedFetcher<C>
impl<C> UnsafeUnpin for SegmentedFetcher<C>
impl<C> UnwindSafe for SegmentedFetcher<C>where
C: RefUnwindSafe,
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