Progress

Enum Progress 

Source
pub enum Progress<'a> {
    FileBegin {
        start: u64,
        name: &'a str,
    },
    ProgressStep,
    FileFailed {
        error: Error,
    },
    FileDone {
        end: u64,
    },
}
Expand description

Progress information

Used for the progress callbacks in some functions in this crate to pass status information to the calling code.

Variants§

§

FileBegin

Processing of a file starts

  • start: offset in the input file where processing starts
  • name: filename (if no metadata is found a dummy name like “file_counter” is used)

Fields

§start: u64
§name: &'a str
§

ProgressStep

Forward progress happened

Guarantees for the progress callbacks:

  • passed at least once for every file that could be successfully processed
  • passed directly after an OS signal interrupted a system call.
§

FileFailed

Processing the current file failed, but this wasn’t fatal for the whole operation

  • error: underlying error

Fields

§error: Error
§

FileDone

Current file was processed successfully

  • end: offset in the input file where processing completed

Fields

§end: u64

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> !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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.