pub struct RetryStatus { /* private fields */ }Expand description
One failed attempt: which, why, and when the next one comes (or that there will be none). See the module docs.
Implementations§
Source§impl RetryStatus
impl RetryStatus
Sourcepub fn new(attempt: u32) -> Self
pub fn new(attempt: u32) -> Self
Attempt attempt (from 1) failed; no retry scheduled yet, so it reads
as giving up until retrying_in is set.
Sourcepub fn max_attempts(self, max: u32) -> Self
pub fn max_attempts(self, max: u32) -> Self
Show the attempt as n/max.
Sourcepub fn retrying_in(self, left: Duration) -> Self
pub fn retrying_in(self, left: Duration) -> Self
The next attempt comes after left.
Sourcepub fn bar(self, delay: Duration) -> Self
pub fn bar(self, delay: Duration) -> Self
Also draw a CountdownBar of the whole delay (use with
retrying_in for the time left).
Sourcepub fn symbols(self, set: SymbolSet) -> Self
pub fn symbols(self, set: SymbolSet) -> Self
How the status is marked (default Unicode; ASCII on an ASCII-only console).
Trait Implementations§
Source§impl Clone for RetryStatus
impl Clone for RetryStatus
Source§impl Debug for RetryStatus
impl Debug for RetryStatus
impl Eq for RetryStatus
Source§impl PartialEq for RetryStatus
impl PartialEq for RetryStatus
Source§impl Renderable for RetryStatus
impl Renderable for RetryStatus
fn rich_render( &self, console: &Console, options: &ConsoleOptions, ) -> Vec<Segment>
Source§fn measure(&self, _console: &Console, options: &ConsoleOptions) -> Measurement
fn measure(&self, _console: &Console, options: &ConsoleOptions) -> Measurement
The
(minimum, maximum) cell width this renderable wants. Port of
__rich_measure__. The default is what upstream’s Measurement.get
returns for a renderable without one: anything from nothing to the
whole width, (0, max_width).Source§fn fit_to_measurement(&self) -> bool
fn fit_to_measurement(&self) -> bool
Whether a top-level
Console::print shrinks this renderable to its
measured width. Upstream renders every top-level renderable at the full
console width, so the default is false; an extension may opt in.Source§fn vertical(&self) -> Option<VerticalAlign>
fn vertical(&self) -> Option<VerticalAlign>
The vertical alignment a
Table cell holding this renderable uses in
place of its column’s. Upstream reads getattr(renderable, "vertical", None); Align sets it.Source§fn print_end_line(&self, _options: &ConsoleOptions) -> bool
fn print_end_line(&self, _options: &ConsoleOptions) -> bool
Whether a top-level print ends this renderable’s last line. This
port’s renderables separate lines, where upstream’s end each line
with
"\n", so a print adds the final line break. A renderable
whose upstream output stops without one (Screen, LiveRender, a
Rule whose end has no newline) returns false, and the next
output continues its last line. options are the print’s options.impl StructuralPartialEq for RetryStatus
Auto Trait Implementations§
impl Freeze for RetryStatus
impl RefUnwindSafe for RetryStatus
impl Send for RetryStatus
impl Sync for RetryStatus
impl Unpin for RetryStatus
impl UnsafeUnpin for RetryStatus
impl UnwindSafe for RetryStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.