pub struct Bar { /* private fields */ }Expand description
A handle for users to control a progress bar created by Manager.
Implementations§
Source§impl Bar
impl Bar
Sourcepub fn set_pos(&self, pos: u64)
pub fn set_pos(&self, pos: u64)
Set the position of the progress bar. This makes an unforced draw.
Sourcepub fn set_len(&self, len: u64)
pub fn set_len(&self, len: u64)
Set the total length of the progress bar. This makes an unforced draw.
Sourcepub fn get_pos(&self) -> u64
pub fn get_pos(&self) -> u64
Get the position of the progress bar.
When manager is dropped, this would return 0
Sourcepub fn get_len(&self) -> u64
pub fn get_len(&self) -> u64
Get the total length of the progress bar.
When manager is dropped, this would return 0
Sourcepub fn finish_and_drop(self)
pub fn finish_and_drop(self)
Set the progress bar to the end, force a draw, and remove the progress bar from the manager.
Sourcepub fn set_visible(&self, visible: bool)
pub fn set_visible(&self, visible: bool)
Set the visibility of the progress bar. This makes an forced draw when visible actually changes.
Sourcepub fn is_visible(&self) -> bool
pub fn is_visible(&self) -> bool
Get the visibility of the progress bar.
When manager is dropped, this would return false
Sourcepub fn set_message(&self, message: &str)
pub fn set_message(&self, message: &str)
Set the message of the progress bar. This makes an unforced draw.
Sourcepub fn set_template(&self, template: &str)
pub fn set_template(&self, template: &str)
Set the template of the progress bar. This makes an unforced draw.