Struct CallbackProgressMonitor

Source
pub struct CallbackProgressMonitor<'n, W: Work, C: Fn(&W, &W)> { /* private fields */ }

Implementations§

Source§

impl<'n, W, C> CallbackProgressMonitor<'n, W, C>
where W: Work, C: Fn(&W, &W),

Source

pub fn new<N: Into<Cow<'n, str>>, A: Into<W>>( name: N, work: A, callback: C, ) -> Self

Trait Implementations§

Source§

impl<'n, W, C> Debug for CallbackProgressMonitor<'n, W, C>
where W: Work, C: Fn(&W, &W),

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'n, W: Work, C: Fn(&W, &W)> Display for CallbackProgressMonitor<'n, W, C>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'n, W: Work, C: Fn(&W, &W)> Drop for CallbackProgressMonitor<'n, W, C>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'n, W, C> ProgressMonitor<W> for CallbackProgressMonitor<'n, W, C>
where W: Work, C: Fn(&W, &W),

Source§

fn total(&self) -> &W

Get the total amount of work.

Source§

fn completed(&self) -> &W

Get the amount of work completed.

Source§

fn remaining(&self) -> Cow<'_, W>

Get the amount of work remaining.

Source§

fn worked<A: Into<W>>(&mut self, amount: A)

Source§

fn close(&mut self) -> Result<(), CloseError>

If you are done with your work, close this monitor.
Source§

impl<'p, 'n, N, W, A1, A2, C> ProgressMonitorDivision<'p, 'n, N, W, A1, A2> for CallbackProgressMonitor<'n, W, C>
where N: Into<Cow<'n, str>>, W: Work, A1: Into<W>, A2: Into<W>, C: Fn(&W, &W),

Source§

fn new_child( &'p mut self, name: N, parent_work: A1, child_work: A2, ) -> ChildMonitor<'n, 'p, W, Self>

Auto Trait Implementations§

§

impl<'n, W, C> Freeze for CallbackProgressMonitor<'n, W, C>
where W: Freeze, C: Freeze,

§

impl<'n, W, C> RefUnwindSafe for CallbackProgressMonitor<'n, W, C>

§

impl<'n, W, C> Send for CallbackProgressMonitor<'n, W, C>
where W: Send, C: Send,

§

impl<'n, W, C> Sync for CallbackProgressMonitor<'n, W, C>
where W: Sync, C: Sync,

§

impl<'n, W, C> Unpin for CallbackProgressMonitor<'n, W, C>
where W: Unpin, C: Unpin,

§

impl<'n, W, C> UnwindSafe for CallbackProgressMonitor<'n, W, C>
where W: UnwindSafe, C: UnwindSafe,

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more