pub struct DownloadIter { /* private fields */ }
Implementations§
Source§impl DownloadIter
impl DownloadIter
Sourcepub fn chunk_size(self, size: i32) -> Self
pub fn chunk_size(self, size: i32) -> Self
Changes the chunk size, in bytes, used to make requests. Useful if you only need to get a
small part of a file. By default, MAX_CHUNK_SIZE
is used.
§Panics
Panics if size
is not divisible by MIN_CHUNK_SIZE
, or if size
is not in contained in
the range MIN_CHUNK_SIZE..=MAX_CHUNK_SIZE
.
Sourcepub fn skip_chunks(self, n: i32) -> Self
pub fn skip_chunks(self, n: i32) -> Self
Skips n
chunks to start downloading a different offset from the file. If you want to
skip less data, modify the chunk_size
before calling this method, and then reset it to
any value you want.
Auto Trait Implementations§
impl Freeze for DownloadIter
impl !RefUnwindSafe for DownloadIter
impl Send for DownloadIter
impl Sync for DownloadIter
impl Unpin for DownloadIter
impl !UnwindSafe for DownloadIter
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