pub struct Layout {
pub mode: Mode,
pub separator: String,
pub row_separator: String,
pub null: String,
pub headers: bool,
pub table: String,
pub widths: Vec<usize>,
pub to_stdout: bool,
}Expand description
Everything a mode needs that is not the rows themselves.
Fields§
§mode: ModeWhich mode.
separator: StringWhat goes between columns, in the modes that use one.
row_separator: StringWhat goes between rows.
null: StringWhat a NULL prints as.
headers: boolWhether to print a header line.
table: StringThe table name insert mode writes.
widths: Vec<usize>The column widths .width fixed, if any.
to_stdout: boolWhether these lines are going to standard output.
Only csv reads it, and only on Windows, where standard output is
the one destination that translates a line feed on the way out. The
bytes are in the comment at the end of [csv]. A file and a collecting
caller both receive exactly what is written to them, so the second
carriage return that makes standard output match the reference is wrong
for both. The shell sets this from where its own output is currently
going; the default is standard output, because that is where a Layout
built by hand is printed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnsafeUnpin for Layout
impl UnwindSafe for Layout
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
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> 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> ⓘ
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> ⓘ
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