pub trait OutputTable {
type Output;
// Required methods
fn num_columns(&self) -> usize;
fn write_row<'url, V: CellValue<'url>>(
&mut self,
row: Row<'_, '_, V>,
line_style: Option<OutputStyle>,
) -> Result<()>;
fn write_title_row(
&mut self,
titles: &[OutputTableTitle<'_>],
line_style: Option<OutputStyle>,
) -> Result<()>;
fn write_bar(
&mut self,
bar_kind: BarKind,
anchor_name: Option<&str>,
) -> Result<()>;
fn print<'url, V: CellValue<'url>>(&mut self, value: V) -> Result<()>;
fn finish(self) -> Result<Self::Output>;
// Provided method
fn write_data_row<'url, V: CellValue<'url>>(
&mut self,
data: &[V],
line_style: Option<OutputStyle>,
) -> Result<()> { ... }
}Required Associated Types§
Required Methods§
Sourcefn num_columns(&self) -> usize
fn num_columns(&self) -> usize
How many columns this table has (each row has the same number of columns, although cells can span multiple columns)
Sourcefn write_row<'url, V: CellValue<'url>>(
&mut self,
row: Row<'_, '_, V>,
line_style: Option<OutputStyle>,
) -> Result<()>
fn write_row<'url, V: CellValue<'url>>( &mut self, row: Row<'_, '_, V>, line_style: Option<OutputStyle>, ) -> Result<()>
Normally, use write_title_row or write_data_row instead!
fn write_title_row( &mut self, titles: &[OutputTableTitle<'_>], line_style: Option<OutputStyle>, ) -> Result<()>
fn write_bar( &mut self, bar_kind: BarKind, anchor_name: Option<&str>, ) -> Result<()>
fn print<'url, V: CellValue<'url>>(&mut self, value: V) -> Result<()>
fn finish(self) -> Result<Self::Output>
Provided Methods§
fn write_data_row<'url, V: CellValue<'url>>( &mut self, data: &[V], line_style: Option<OutputStyle>, ) -> Result<()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.