[−][src]Struct progressing::mapping::Bar
A progress-bar mapping values from [a, b] (e.g. [-9, 5]) to [0, 1].
use progressing::{mapping::Bar as MappingBar, Baring}; /// Mapping from [-9, 5] to [0, 1] /// [================>-] (4 / 5) fn main() { println!("Mapping from [-9, 5] to [0, 1]"); let mut progress_bar = MappingBar::with_range(-9, 5); progress_bar.set_len(20); progress_bar.set(4); println!("{}", progress_bar); }
Implementations
impl<N> Bar<N> where
N: Clone, [src]
N: Clone,
pub fn with_range(from: N, to: N) -> Bar<N>[src]
pub fn with(cfg: Config<N>) -> Bar<N>[src]
pub fn timed(self) -> Bar<Bar<N>> where
Bar<N>: Baring, [src]
Bar<N>: Baring,
Trait Implementations
impl Baring for Bar<usize>[src]
type Progress = usize
fn len(&self) -> usize[src]
fn set_len(&mut self, new_bar_len: usize)[src]
fn progress(&self) -> usize[src]
fn set<P>(&mut self, new_progress: P) where
P: Into<usize>, [src]
P: Into<usize>,
fn start(&self) -> usize[src]
fn end(&self) -> usize[src]
fn has_progressed_significantly(&self) -> bool[src]
fn remember_significant_progress(&mut self)[src]
fn add<P>(&mut self, delta: P) where
P: Into<Self::Progress>, [src]
P: Into<Self::Progress>,
impl Baring for Bar<i64>[src]
type Progress = i64
fn len(&self) -> usize[src]
fn set_len(&mut self, new_bar_len: usize)[src]
fn progress(&self) -> i64[src]
fn set<P>(&mut self, new_progress: P) where
P: Into<i64>, [src]
P: Into<i64>,
fn start(&self) -> i64[src]
fn end(&self) -> i64[src]
fn has_progressed_significantly(&self) -> bool[src]
fn remember_significant_progress(&mut self)[src]
fn add<P>(&mut self, delta: P) where
P: Into<Self::Progress>, [src]
P: Into<Self::Progress>,
impl Baring for Bar<i32>[src]
type Progress = i32
fn len(&self) -> usize[src]
fn set_len(&mut self, new_bar_len: usize)[src]
fn progress(&self) -> i32[src]
fn set<P>(&mut self, new_progress: P) where
P: Into<i32>, [src]
P: Into<i32>,
fn start(&self) -> i32[src]
fn end(&self) -> i32[src]
fn has_progressed_significantly(&self) -> bool[src]
fn remember_significant_progress(&mut self)[src]
fn add<P>(&mut self, delta: P) where
P: Into<Self::Progress>, [src]
P: Into<Self::Progress>,
impl<N: Debug> Debug for Bar<N>[src]
impl<N> Display for Bar<N> where
N: Display,
Bar<N>: Baring,
<Bar<N> as Baring>::Progress: Display, [src]
N: Display,
Bar<N>: Baring,
<Bar<N> as Baring>::Progress: Display,
Auto Trait Implementations
impl<N> RefUnwindSafe for Bar<N> where
N: RefUnwindSafe,
N: RefUnwindSafe,
impl<N> Send for Bar<N> where
N: Send,
N: Send,
impl<N> Sync for Bar<N> where
N: Sync,
N: Sync,
impl<N> Unpin for Bar<N> where
N: Unpin,
N: Unpin,
impl<N> UnwindSafe for Bar<N> where
N: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,