pub struct ListDisplay<'a, T> { /* private fields */ }Expand description
Display wrapper for natural-language list formatting.
Instances of this type are created via crate::list() and crate::list_with.
§Examples
use humfmt::list;
assert_eq!(list(&["red", "green", "blue"]).to_string(), "red, green, and blue");Trait Implementations§
Source§impl<'a, T: Clone> Clone for ListDisplay<'a, T>
impl<'a, T: Clone> Clone for ListDisplay<'a, T>
Source§fn clone(&self) -> ListDisplay<'a, T>
fn clone(&self) -> ListDisplay<'a, T>
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<T: Display> Display for ListDisplay<'_, T>
impl<T: Display> Display for ListDisplay<'_, T>
impl<'a, T: Copy> Copy for ListDisplay<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for ListDisplay<'a, T>
impl<'a, T> RefUnwindSafe for ListDisplay<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for ListDisplay<'a, T>where
T: Sync,
impl<'a, T> Sync for ListDisplay<'a, T>where
T: Sync,
impl<'a, T> Unpin for ListDisplay<'a, T>
impl<'a, T> UnsafeUnpin for ListDisplay<'a, T>
impl<'a, T> UnwindSafe for ListDisplay<'a, T>where
T: RefUnwindSafe,
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.