Struct gix_features::progress::unit::Range
source · 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§
source§impl DisplayValue for Range
impl DisplayValue for Range
source§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 moresource§fn 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
source§fn dyn_hash(&self, state: &mut dyn Hasher)
fn dyn_hash(&self, state: &mut dyn Hasher)
A way to hash our state without using generics. Read more
source§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>
source§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
.source§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
.source§impl Ord for Range
impl Ord for Range
source§impl PartialEq for Range
impl PartialEq for Range
source§impl PartialOrd for Range
impl PartialOrd for Range
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Range
impl Eq for Range
impl StructuralPartialEq for Range
Auto Trait Implementations§
impl Freeze for Range
impl RefUnwindSafe for Range
impl Send for Range
impl Sync for Range
impl Unpin for Range
impl UnwindSafe for Range
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more