Struct loading_bar::simple_loading_bar::SimpleLoadingBar
source · [−]pub struct SimpleLoadingBar { /* private fields */ }
Expand description
like a LoadingBar, but only uses '\r'
instead of crossterm::cursor
to update the loading bar.
This may makeit easeir to use especially when scrolling is involved.
Nothing else can be printed to the same shell/terminal while it is running or else you might get weird results.
Implementations
sourceimpl SimpleLoadingBar
impl SimpleLoadingBar
pub fn auto_run(
time_in_seconds: u16,
len: u16,
start: u16,
color: Option<Color>
)
pub fn auto_run_change(
change: Vec<Option<Color>>,
time_in_seconds: u16,
len: u16,
start: u16
)
pub fn auto_run_change_points(
change: HashMap<u16, Option<Color>>,
time_in_seconds: u16,
len: u16,
start: u16
)
pub fn auto_run_from(simpleloading_bar: SimpleLoadingBar, time_in_seconds: u16)
pub fn auto_run_from_change(
simpleloading_bar: SimpleLoadingBar,
change: Vec<Option<Color>>,
time_in_seconds: u16
)
pub fn auto_run_from_change_points<T, U>(
simpleloading_bar: SimpleLoadingBar,
change: HashMap<T, U>,
time_in_seconds: u16,
type_change: Types
) where
T: Copy + Debug,
u16: From<T>,
f32: From<T>,
U: Copy + Debug + Send + 'static,
Option<Color>: From<U>,
sourceimpl SimpleLoadingBar
impl SimpleLoadingBar
pub fn new(len: u16, color: Option<Color>) -> SimpleLoadingBar
pub fn print(&self)
pub fn advance(&mut self)
pub fn advance_print(&mut self)
pub fn advance_by(&mut self, index: u16)
pub fn advance_by_print(&mut self, index: u16)
pub fn advance_by_percent(&mut self, percentage: f32)
pub fn advance_by_percent_print(&mut self, percentage: f32)
pub fn change_character_type(&mut self, character: char)
pub fn change_character_type_print(&mut self, character: char)
pub fn change_last_character(&mut self, character: char)
pub fn change_last_character_print(&mut self, character: char)
pub fn change_color(&mut self, color: Option<Color>)
pub fn change_color_print(&mut self, color: Option<Color>)
pub fn change_bracket_color(&mut self, color: Option<Color>)
pub fn change_bracket_color_print(&mut self, color: Option<Color>)
pub fn change(
&mut self,
options: HashMap<String, SimpleLoadingBarOptions>,
print: bool
)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SimpleLoadingBar
impl Send for SimpleLoadingBar
impl Sync for SimpleLoadingBar
impl Unpin for SimpleLoadingBar
impl UnwindSafe for SimpleLoadingBar
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more