Skip to main content

DataWriter

Trait DataWriter 

Source
pub trait DataWriter: Send + Sync {
    // Required methods
    fn write(
        &self,
        path: &str,
        data: &[Vec<String>],
        options: DataWriteOptions,
    ) -> Result<()>;
    fn write_range(
        &self,
        path: &str,
        data: &[Vec<String>],
        start_row: usize,
        start_col: usize,
    ) -> Result<()>;
    fn append(&self, path: &str, data: &[Vec<String>]) -> Result<()>;
    fn supports_format(&self, path: &str) -> bool;
}
Expand description

Trait for writing data to files

Required Methods§

Source

fn write( &self, path: &str, data: &[Vec<String>], options: DataWriteOptions, ) -> Result<()>

Write data to a file

Source

fn write_range( &self, path: &str, data: &[Vec<String>], start_row: usize, start_col: usize, ) -> Result<()>

Write data to a specific cell range

Source

fn append(&self, path: &str, data: &[Vec<String>]) -> Result<()>

Append data to an existing file

Source

fn supports_format(&self, path: &str) -> bool

Check if the file format is supported

Implementors§