pub struct Indented<'i, T: Display> {
pub item: T,
pub indent: &'i str,
}
Expand description
Wrapper struct that indents the Display representation of an item. When
printed with Display, it will insert indent before
each non-empty line of the underlying item’s Display
output.
Created with Indentable::indented; see its documentation for an example.
The indentation to insert before each non-empty line.
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Wrap this object so that its Display representation is indented
with the given indent. Each non-empty line of the formatted output
will be prefixed with the indent. Read more
Wrap this object so that its Display representation is indented
with the given indent. Each non-empty line except for the first
of the formatted output will be prefixed with the indent. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into)
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.