pub struct ProgressTracker { /* private fields */ }Expand description
Shared progress tracker inserted into request extensions.
Handlers can access this to check current upload progress.
Implementations§
Source§impl ProgressTracker
impl ProgressTracker
Sourcepub fn state(&self) -> ProgressState
pub fn state(&self) -> ProgressState
Returns the current progress state.
Sourcepub fn bytes_read(&self) -> u64
pub fn bytes_read(&self) -> u64
Returns the number of bytes read so far.
Sourcepub fn total_bytes(&self) -> Option<u64>
pub fn total_bytes(&self) -> Option<u64>
Returns the total expected bytes, if known.
Trait Implementations§
Source§impl Clone for ProgressTracker
impl Clone for ProgressTracker
Source§fn clone(&self) -> ProgressTracker
fn clone(&self) -> ProgressTracker
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProgressTracker
impl RefUnwindSafe for ProgressTracker
impl Send for ProgressTracker
impl Sync for ProgressTracker
impl Unpin for ProgressTracker
impl UnsafeUnpin for ProgressTracker
impl UnwindSafe for ProgressTracker
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