pub trait Format {
fn write_value(&mut self, value: &Value) -> Result<(), Error>;
fn write_header(&mut self, qualified_table_name: &str) -> Result<(), Error>;
fn write_value_separator(&mut self) -> Result<(), Error>;
fn write_row_separator(&mut self) -> Result<(), Error>;
fn write_trailer(&mut self) -> Result<(), Error>;
}
Expand description
Wrapper of a writer which could serialize a value into a string.
Required Methods
sourcefn write_value(&mut self, value: &Value) -> Result<(), Error>
fn write_value(&mut self, value: &Value) -> Result<(), Error>
Writes a single value to the writer, formatted according to specific rules of this formatter.
sourcefn write_header(&mut self, qualified_table_name: &str) -> Result<(), Error>
fn write_header(&mut self, qualified_table_name: &str) -> Result<(), Error>
Writes the content of an INSERT statement before all rows.
sourcefn write_value_separator(&mut self) -> Result<(), Error>
fn write_value_separator(&mut self) -> Result<(), Error>
Writes the separator between the every value.
sourcefn write_row_separator(&mut self) -> Result<(), Error>
fn write_row_separator(&mut self) -> Result<(), Error>
Writes the separator between the every row.
sourcefn write_trailer(&mut self) -> Result<(), Error>
fn write_trailer(&mut self) -> Result<(), Error>
Writes the content of an INSERT statement after all rows.