Trait TableOutputFormat

Source
pub trait TableOutputFormat {
    // Required method
    fn extract_write<'buf, 'data>(
        &self,
        x: &InputExtract<'data>,
        c: &mut Context<'buf>,
    ) -> Result;
}
Expand description

Trait for converting table extracts into string representations.

TableOutputFormat defines the method for formatting table data and writing it into a specified buffer, providing flexibility in output style and format.

Required Methods§

Source

fn extract_write<'buf, 'data>( &self, x: &InputExtract<'data>, c: &mut Context<'buf>, ) -> Result

Formats the table extract and writes it into the destination buffer.

§Parameters
  • x: The InputExtract containing table data to be formatted.
  • c: The Context holding the buffer and styles for formatting.
§Returns

A fmt::Result indicating success or failure of the write operation.

Trait Implementations§

Source§

impl Default for &'static dyn TableOutputFormat

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Implementors§