pub struct HttpDownload { /* private fields */ }Implementations§
Source§impl HttpDownload
impl HttpDownload
pub fn new() -> Self
pub fn new_with_config(conf: Config) -> Self
pub fn set_timeout(&mut self, timeout: u64) -> &mut Self
pub fn on_down_progress( &mut self, cb: Option<Box<dyn Fn(u8) + Send + Sync + 'static>>, ) -> &mut Self
pub fn on_down_finish(&mut self, cb: Option<fn(String)>) -> &mut Self
pub fn set_headers(&mut self, headers: HeaderMap) -> &mut Self
pub fn set_save_dir(&mut self, save_dir: String) -> &mut Self
pub fn set_file_md5(&mut self, md5: String) -> &mut Self
pub fn set_chunk_size(&mut self, chunk_size: u64) -> &mut Self
pub fn set_max_retries(&mut self, max_retries: u8) -> &mut Self
pub fn set_user_agent(&mut self, user_agent: &str) -> &mut Self
pub fn set_num_workers(&mut self, num_workers: usize) -> &mut Self
pub fn debug(&mut self, debug: bool) -> &mut Self
pub async fn url_headers_info(&self, url: &str) -> Result<(), Error>
pub async fn set_url(&mut self, url: &str) -> Result<&mut Self, Error>
pub async fn start(&mut self) -> Result<String, Error>
pub async fn gener_download(&mut self) -> Result<String, Error>
pub async fn chunk_download(&mut self) -> Result<String, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HttpDownload
impl !RefUnwindSafe for HttpDownload
impl Send for HttpDownload
impl Sync for HttpDownload
impl Unpin for HttpDownload
impl !UnwindSafe for HttpDownload
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