pub struct NumberDisplay { /* private fields */ }Expand description
Display wrapper for compact number formatting (e.g. "15.3K").
Instances of this type are created via crate::number() and crate::number_with.
This type does not allocate by itself; allocation only happens if the caller
requests an owned String via .to_string() or format!(...).
Trait Implementations§
Source§impl Clone for NumberDisplay
impl Clone for NumberDisplay
Source§fn clone(&self) -> NumberDisplay
fn clone(&self) -> NumberDisplay
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NumberDisplay
impl Debug for NumberDisplay
Source§impl Display for NumberDisplay
impl Display for NumberDisplay
impl Copy for NumberDisplay
Auto Trait Implementations§
impl Freeze for NumberDisplay
impl RefUnwindSafe for NumberDisplay
impl Send for NumberDisplay
impl Sync for NumberDisplay
impl Unpin for NumberDisplay
impl UnsafeUnpin for NumberDisplay
impl UnwindSafe for NumberDisplay
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<T> Humanize for T
impl<T> Humanize for T
Source§fn human_bytes(self) -> BytesDisplaywhere
Self: BytesLike,
fn human_bytes(self) -> BytesDisplaywhere
Self: BytesLike,
Formats this value as a human-readable byte size using default options.
Source§fn human_bytes_with(self, options: BytesOptions) -> BytesDisplaywhere
Self: BytesLike,
fn human_bytes_with(self, options: BytesOptions) -> BytesDisplaywhere
Self: BytesLike,
Formats this value as a human-readable byte size using custom options.
Source§fn human_ago(self) -> AgoDisplaywhere
Self: DurationLike,
fn human_ago(self) -> AgoDisplaywhere
Self: DurationLike,
Formats this duration as relative time using default options.
Source§fn human_ago_with(self, options: DurationOptions) -> AgoDisplaywhere
Self: DurationLike,
fn human_ago_with(self, options: DurationOptions) -> AgoDisplaywhere
Self: DurationLike,
Formats this duration as relative time using custom duration options.
Source§fn human_duration(self) -> DurationDisplaywhere
Self: DurationLike,
fn human_duration(self) -> DurationDisplaywhere
Self: DurationLike,
Formats this duration using default options.
Source§fn human_duration_with(self, options: DurationOptions) -> DurationDisplaywhere
Self: DurationLike,
fn human_duration_with(self, options: DurationOptions) -> DurationDisplaywhere
Self: DurationLike,
Formats this duration using custom duration options.
Source§fn human_number(self) -> NumberDisplaywhere
Self: NumberLike,
fn human_number(self) -> NumberDisplaywhere
Self: NumberLike,
Formats this numeric value as a compact human-readable number using default options.
Source§fn human_number_with(self, options: NumberOptions) -> NumberDisplaywhere
Self: NumberLike,
fn human_number_with(self, options: NumberOptions) -> NumberDisplaywhere
Self: NumberLike,
Formats this numeric value as a compact human-readable number using custom options.
Source§fn human_ordinal(self) -> OrdinalDisplaywhere
Self: OrdinalLike,
fn human_ordinal(self) -> OrdinalDisplaywhere
Self: OrdinalLike,
Formats this value as an ordinal number.
Source§fn human_percent(self) -> PercentDisplaywhere
Self: PercentLike,
fn human_percent(self) -> PercentDisplaywhere
Self: PercentLike,
Formats this value as a human-readable percentage using default options. Read more
Source§fn human_percent_with(self, options: PercentOptions) -> PercentDisplaywhere
Self: PercentLike,
fn human_percent_with(self, options: PercentOptions) -> PercentDisplaywhere
Self: PercentLike,
Formats this value as a human-readable percentage using custom options.