Struct indicatif::WeakProgressBar
source · pub struct WeakProgressBar { /* private fields */ }
Expand description
A weak reference to a ProgressBar
.
Useful for creating custom steady tick implementations
Implementations§
source§impl WeakProgressBar
impl WeakProgressBar
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new WeakProgressBar
that returns None
when upgrade()
is called.
sourcepub fn upgrade(&self) -> Option<ProgressBar>
pub fn upgrade(&self) -> Option<ProgressBar>
Attempts to upgrade the Weak pointer to a ProgressBar
, delaying dropping of the inner
value if successful. Returns None
if the inner value has since been dropped.
Trait Implementations§
source§impl Clone for WeakProgressBar
impl Clone for WeakProgressBar
source§fn clone(&self) -> WeakProgressBar
fn clone(&self) -> WeakProgressBar
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for WeakProgressBar
impl Default for WeakProgressBar
source§fn default() -> WeakProgressBar
fn default() -> WeakProgressBar
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for WeakProgressBar
impl Send for WeakProgressBar
impl Sync for WeakProgressBar
impl Unpin for WeakProgressBar
impl UnwindSafe for WeakProgressBar
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