Struct git_repository::progress::unit::Range
pub struct Range {
pub name: &'static str,
}
Available on crate feature
progress
only.Expand description
A helper for formatting numbers representing ranges in renderers as in 2 of 5 steps
.
Fields
name: &'static str
The name of the unit to be appended to the range.
Implementations
Trait Implementations
impl DisplayValue for Range
impl DisplayValue for Range
fn display_current_value(
&self,
w: &mut dyn Write,
value: usize,
_upper: Option<usize>
) -> Result<(), Error>
fn display_current_value(
&self,
w: &mut dyn Write,
value: usize,
_upper: Option<usize>
) -> Result<(), Error>
Display the absolute
value
representing the current progress of an operation and write it to w
. Read morefn separator(
&self,
w: &mut dyn Write,
_value: usize,
_upper: Option<usize>
) -> Result<(), Error>
fn separator(
&self,
w: &mut dyn Write,
_value: usize,
_upper: Option<usize>
) -> Result<(), Error>
Emit a token to separate two values. Read more
fn display_upper_bound(
&self,
w: &mut dyn Write,
upper_bound: usize,
_value: usize
) -> Result<(), Error>
fn display_upper_bound(
&self,
w: &mut dyn Write,
upper_bound: usize,
_value: usize
) -> Result<(), Error>
fn display_percentage(
&self,
w: &mut dyn Write,
percentage: f64
) -> Result<(), Error>
fn display_percentage(
&self,
w: &mut dyn Write,
percentage: f64
) -> Result<(), Error>
Emit
percentage
to w
.fn display_throughput(
&self,
w: &mut dyn Write,
throughput: &Throughput
) -> Result<(), Error>
fn display_throughput(
&self,
w: &mut dyn Write,
throughput: &Throughput
) -> Result<(), Error>
Emit the
throughput
of an operation to w
.fn fraction_and_time_unit(
&self,
timespan: Duration
) -> (Option<f64>, &'static str)
fn fraction_and_time_unit(
&self,
timespan: Duration
) -> (Option<f64>, &'static str)
Given a
timespan
, return a fraction of the timespan based on the given unit, i.e. (possible fraction, unit
).impl Ord for Range
impl Ord for Range
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
impl PartialOrd<Range> for Range
impl PartialOrd<Range> for Range
impl Copy for Range
impl Eq for Range
impl StructuralEq for Range
impl StructuralPartialEq for Range
Auto Trait Implementations
impl RefUnwindSafe for Range
impl Send for Range
impl Sync for Range
impl Unpin for Range
impl UnwindSafe for Range
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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