pub struct TsvExporter;Expand description
Tab-separated values that Excel, Numbers and LibreOffice paste as cells.
Cells are separated by \t and lines by \n, with nothing after the last
line. A field that holds \t, \n, \r or " is put in quotes, with
inner quotes doubled, as Excel does. A cell the row does not export is an
empty field.
A summary row is a line like any other (ExportLine): a caption’s key
value and the aggregates land under their columns, its other fields are
empty. A row’s depth adds no indent, so the key value stays data; wrap the
exporter in a LineFilter to leave lines out.
As an ExportFormat (“tsv”) it writes the same text as UTF-8 without a
byte order mark, 1024 rows at a time. Both traits name their method
export: with both in scope, call it through the trait, as
Exporter::export(&TsvExporter, &table, &cells, &mut text).
Trait Implementations§
Source§impl Clone for TsvExporter
impl Clone for TsvExporter
Source§fn clone(&self) -> TsvExporter
fn clone(&self) -> TsvExporter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TsvExporter
impl Debug for TsvExporter
Source§impl Default for TsvExporter
impl Default for TsvExporter
Source§fn default() -> TsvExporter
fn default() -> TsvExporter
Source§impl<R: GridRow> ExportFormat<R> for TsvExporter
impl<R: GridRow> ExportFormat<R> for TsvExporter
Source§fn export(
&self,
table: &ExportTable<'_, R>,
cells: &CellExport<R>,
out: &mut dyn Write,
control: &ExportControl,
) -> Result<(), ExportError>
fn export( &self, table: &ExportTable<'_, R>, cells: &CellExport<R>, out: &mut dyn Write, control: &ExportControl, ) -> Result<(), ExportError>
table to out; text cells with cells, as a text format
does (a spreadsheet format reads ExportCell::value instead).Source§impl<R: GridRow> Exporter<R> for TsvExporter
impl<R: GridRow> Exporter<R> for TsvExporter
Source§fn export(
&self,
table: &ExportTable<'_, R>,
cells: &CellExport<R>,
out: &mut String,
)
fn export( &self, table: &ExportTable<'_, R>, cells: &CellExport<R>, out: &mut String, )
table to out, writing each cell with cells.impl Copy for TsvExporter
Auto Trait Implementations§
impl Freeze for TsvExporter
impl RefUnwindSafe for TsvExporter
impl Send for TsvExporter
impl Sync for TsvExporter
impl Unpin for TsvExporter
impl UnsafeUnpin for TsvExporter
impl UnwindSafe for TsvExporter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().