pub(crate) struct ProgressReport<'a> {
curr: f32,
text: String,
hidden: bool,
len: usize,
pos: u64,
msg: Option<Box<dyn Fn() -> String + 'a>>,
}Expand description
A Simple ASCII Progress Bar
Fields§
§curr: f32§text: String§len: usize§pos: u64§msg: Option<Box<dyn Fn() -> String + 'a>>Implementations§
Source§impl<'a> ProgressReport<'a>
impl<'a> ProgressReport<'a>
pub(crate) fn new(len: usize) -> ProgressReport<'a>
pub(crate) fn set_message(&mut self, msg: impl Fn() -> String + 'a)
pub(crate) fn println<I: Into<String>>(&mut self, msg: I)
pub(crate) fn inc(&mut self, delta: u64)
pub(crate) fn finish_and_clear(&mut self)
pub(crate) fn tick(&mut self)
fn update_text(&mut self, text: &str)
fn set_value(&mut self, value: f32)
fn clear(&mut self)
Auto Trait Implementations§
impl<'a> Freeze for ProgressReport<'a>
impl<'a> !RefUnwindSafe for ProgressReport<'a>
impl<'a> !Send for ProgressReport<'a>
impl<'a> !Sync for ProgressReport<'a>
impl<'a> Unpin for ProgressReport<'a>
impl<'a> !UnwindSafe for ProgressReport<'a>
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
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more