pub struct DownloadMutiProgess { /* private fields */ }Implementations§
Source§impl DownloadMutiProgess
impl DownloadMutiProgess
Sourcepub fn new(progres_bars: Vec<DownloadProgress>, total_number: u64) -> Self
pub fn new(progres_bars: Vec<DownloadProgress>, total_number: u64) -> Self
这里total_number限定总进度条的上限,而不是取progres_bars的长度, 处于美观需要,不会在add方法里面动态增长进度条上限
progres_bars: 初始进度条,一般是空向量total_number: 进度条上限
pub fn add(&mut self, progress: DownloadProgress)
pub fn update(&mut self, id: &str, inc_len: u64)
pub fn inc_total(&mut self)
pub fn finish(&mut self)
Auto Trait Implementations§
impl Freeze for DownloadMutiProgess
impl RefUnwindSafe for DownloadMutiProgess
impl Send for DownloadMutiProgess
impl Sync for DownloadMutiProgess
impl Unpin for DownloadMutiProgess
impl UnsafeUnpin for DownloadMutiProgess
impl UnwindSafe for DownloadMutiProgess
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