pub fn new(
        tables: &'a [Table],
        state: &'a mut State,
        qualified: bool,
        mut new_writer: impl FnMut(&Table) -> Result<W, S<Error>>,
    ) -> Result<Self, S<Error>> {
        Ok(Self {
            tables: tables
                .iter()
                .map(|table| {
                    let mut writer = new_writer(table)?;
                    let schema = table.schema(qualified);
                    writer.write_file_header(&schema)?;
                    Ok::<_, S<Error>>(TableState {
                        table,
                        schema,
                        writer,
                        fresh: true,
                        empty: true,
                    })
                })
                .collect::<Result<_, _>>()?,
            state,
            qualified,
        })
    }
/// Constructs a new row-writing environment.
Constructs a new row-writing environment.
Constructs a new row - writing environment .
pub fn new(
        tables: &'a [Table],
        state: &'a mut State,
        qualified: bool,
        mut new_writer: impl FnMut(&Table) -> Result<W, S<Error>>,
    ) -> Result<Self, S<Error>> {
        Ok(Self {
            tables: tables
                .iter()
                .map(|table| {
                    let mut writer = new_writer(table)?;
                    let schema = table.schema(qualified);
                    writer.write_file_header(&schema)?;
                    Ok::<_, S<Error>>(TableState {
                        table,
                        schema,
                        writer,
                        fresh: true,
                        empty: true,
                    })
                })
                .collect::<Result<_, _>>()?,
            state,
            qualified,
        })
    }
pub fn new ( tables : & ' a [ Table ] , state : & ' a mut State , qualified : bool , mut new_writer : impl FnMut ( & Table ) -> Result < W , S < Error > > , ) -> Result < Self , S < Error > > { Ok ( Self { tables : tables . iter ( ) . map ( | table | { let mut writer = new_writer ( table ) ? ; let schema = table . schema ( qualified ) ; writer . write_file_header ( & schema ) ? ; Ok :: < _ , S < Error > > ( TableState { table , schema , writer , fresh : true , empty : true , } ) } ) . collect :: < Result < _ , _ > > ( ) ? , state , qualified , } ) }
Constructs a new row-writing environment.
Constructs a new row - writing environment .
tables
&'a [Table]
state
&'a mut State
qualified
bool
new_writer
impl FnMut(&Table) -> Result<W, S<Error>>
tables
&'a [Table]
state
&'a mut State
qualified
bool
new_writer
impl FnMut(&Table) -> Result<W, S<Error>>