pub trait ToCsv: Sealedwhere
Self: TypeInfo + Serialize,{
// Required method
fn to_csv_writer<W>(
&self,
writer: W,
table: CsvTable
) -> Result<(), StamError>
where W: Write;
// Provided methods
fn to_csv_file(
&self,
filename: &str,
config: &Config,
table: CsvTable
) -> Result<(), StamError> { ... }
fn to_csv_string(
&self,
table: Option<CsvTable>
) -> Result<String, StamError> { ... }
}Required Methods§
fn to_csv_writer<W>(&self, writer: W, table: CsvTable) -> Result<(), StamError>where W: Write,
Provided Methods§
sourcefn to_csv_file(
&self,
filename: &str,
config: &Config,
table: CsvTable
) -> Result<(), StamError>
fn to_csv_file( &self, filename: &str, config: &Config, table: CsvTable ) -> Result<(), StamError>
Writes this structure to a file
The actual dataformat can be set via config, the default is STAM JSON.
Note: This only writes a single table! Just use [AnnotationStore.save()] to write everything.