pub struct DefaultDisplayFormat;Expand description
Formats values with fmt::Display using {} only (ignores alternate form).
Trait Implementations§
Source§impl Clone for DefaultDisplayFormat
impl Clone for DefaultDisplayFormat
Source§fn clone(&self) -> DefaultDisplayFormat
fn clone(&self) -> DefaultDisplayFormat
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 moreimpl Copy for DefaultDisplayFormat
Source§impl Debug for DefaultDisplayFormat
impl Debug for DefaultDisplayFormat
Source§impl Default for DefaultDisplayFormat
impl Default for DefaultDisplayFormat
Source§fn default() -> DefaultDisplayFormat
fn default() -> DefaultDisplayFormat
Returns the “default value” for a type. Read more
Source§impl FormatterToString for DefaultDisplayFormat
impl FormatterToString for DefaultDisplayFormat
Source§fn to_string<T: Display>(&self, value: T) -> String
fn to_string<T: Display>(&self, value: T) -> String
Format values to
String, respecting a formatter-style alternate flag.Source§fn to_multiline_string<'a, T, I>(&self, items: I) -> Stringwhere
T: Display + 'a,
I: IntoIterator<Item = T>,
fn to_multiline_string<'a, T, I>(&self, items: I) -> Stringwhere
T: Display + 'a,
I: IntoIterator<Item = T>,
One line per item, each formatted via
FormatterToString::to_string.Source§fn to_multiline_indexed_string<'a, T, I>(&self, items: I) -> Stringwhere
T: Display + 'a,
I: IntoIterator<Item = T>,
fn to_multiline_indexed_string<'a, T, I>(&self, items: I) -> Stringwhere
T: Display + 'a,
I: IntoIterator<Item = T>,
Like
FormatterToString::to_multiline_string, but each item is prefixed with its index and
indented (four spaces per line of the item’s string form).Source§fn to_table_string<T: Display>(&self, items: &[T]) -> String
fn to_table_string<T: Display>(&self, items: &[T]) -> String
Format items as a bracketed table with default layout (32 columns, 4-space indent).
Source§fn to_table_string_custom<T: Display, I: IntoIterator<Item = T>>(
&self,
items: I,
columns: usize,
indent: usize,
brackets: bool,
newlines: bool,
) -> String
fn to_table_string_custom<T: Display, I: IntoIterator<Item = T>>( &self, items: I, columns: usize, indent: usize, brackets: bool, newlines: bool, ) -> String
Format items as a comma-separated table.
columns items per row (0 disables wrapping),
each row indented by indent spaces, optionally wrapped in [] and split across lines.Auto Trait Implementations§
impl Freeze for DefaultDisplayFormat
impl RefUnwindSafe for DefaultDisplayFormat
impl Send for DefaultDisplayFormat
impl Sync for DefaultDisplayFormat
impl Unpin for DefaultDisplayFormat
impl UnsafeUnpin for DefaultDisplayFormat
impl UnwindSafe for DefaultDisplayFormat
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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