Struct git_repository::progress::unit::Bytes
[−]pub struct Bytes;
unstable
and progress
only.Expand description
A marker for formatting numbers as bytes in renderers.
Trait Implementations
impl DisplayValue for Bytes
impl DisplayValue for Bytes
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 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>
Emit the upper_bound
to w
. Read more
fn display_unit(&self, _w: &mut dyn Write, _value: usize) -> Result<(), Error>
fn display_unit(&self, _w: &mut dyn Write, _value: usize) -> Result<(), Error>
Emit the unit of value
to w
. Read more
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
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 Bytes
impl Ord for Bytes
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
impl PartialEq<Bytes> for Bytes
impl PartialEq<Bytes> for Bytes
impl PartialOrd<Bytes> for Bytes
impl PartialOrd<Bytes> for Bytes
fn partial_cmp(&self, other: &Bytes) -> Option<Ordering>
fn partial_cmp(&self, other: &Bytes) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl Copy for Bytes
impl Eq for Bytes
impl StructuralEq for Bytes
impl StructuralPartialEq for Bytes
Auto Trait Implementations
impl RefUnwindSafe for Bytes
impl Send for Bytes
impl Sync for Bytes
impl Unpin for Bytes
impl UnwindSafe for Bytes
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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