Trait stam::ToCsv

source ·
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§

source

fn to_csv_writer<W>(&self, writer: W, table: CsvTable) -> Result<(), StamError>where W: Write,

Provided Methods§

source

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.

source

fn to_csv_string(&self, table: Option<CsvTable>) -> Result<String, StamError>

Implementors§