Skip to main content

Progress

Struct Progress 

Source
pub struct Progress<'a> {
    pub bytes_copied: u64,
    pub total_bytes: u64,
    pub entries_done: u64,
    pub entries_total: u64,
    pub current_path: &'a Path,
}
Expand description

A progress snapshot passed to the callback of copy_tree_with_progress and move_tree_with_progress.

Fields§

§bytes_copied: u64

Bytes copied so far. Non-decreasing across every call of one operation, and equal to the returned summary’s byte count on success.

§total_bytes: u64

Total regular-file bytes found by the pre-scan. Fixed for the whole operation. A tree mutated concurrently can make bytes_copied land under or over this value. Monotonicity still holds.

§entries_done: u64

Entries (files, directories, symlinks) completed so far.

§entries_total: u64

Entries found by the pre-scan. Fixed for the whole operation.

§current_path: &'a Path

The entry being processed when this snapshot was taken. The first snapshot of an operation names the destination root.

Trait Implementations§

Source§

impl<'a> Debug for Progress<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Progress<'a>

§

impl<'a> RefUnwindSafe for Progress<'a>

§

impl<'a> Send for Progress<'a>

§

impl<'a> Sync for Progress<'a>

§

impl<'a> Unpin for Progress<'a>

§

impl<'a> UnsafeUnpin for Progress<'a>

§

impl<'a> UnwindSafe for Progress<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.