[][src]Struct progressing::BernoulliBar

pub struct BernoulliBar { /* fields omitted */ }

A progressbar counting successes (e.g. 42 out of 60) and respective attempts (e.g. 130).

Mini-Example

use progressing::Bar;

/// Bernoulli-Bar counting successes (42 / 60) and attempts (# 130)
/// [============>-----] (42 / 60 # 130)
fn main() -> Result<(), String> {
    println!("Bernoulli-Bar counting successes (42 / 60) and attempts (# 130)");
    let mut progressbar = progressing::BernoulliBar::from_goal(60);
    progressbar.set_bar_len(20);
    progressbar.set((42, 130)).reprintln()
}

Methods

impl BernoulliBar[src]

pub fn from_goal(n: u32) -> BernoulliBar[src]

pub fn start(&self) -> u32[src]

pub fn end(&self) -> u32[src]

Trait Implementations

impl Bar for BernoulliBar[src]

type Progress = BernoulliProgress

impl Debug for BernoulliBar[src]

impl Default for BernoulliBar[src]

impl Display for BernoulliBar[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.