pub fn write<W, F, I>(writer: &mut W, format: F, mut blocks: I) -> Result<()>
where
    W: std::io::Write,
    F: JsonFormat,
    I: FallibleStreamingIterator<Item = [u8], Error = ArrowError>,
{
    format.start_stream(writer)?;
    let mut is_first_row = true;
    while let Some(block) = blocks.next()? {
        format.start_row(writer, is_first_row)?;
        is_first_row = false;
        writer.write_all(block)?;
    }
    format.end_stream(writer)?;
    Ok(())
}
/// Writes blocks of JSON-encoded data into `writer`, ensuring that the written
/// JSON has the expected `format`
Writes blocks of JSON-encoded data into `writer`, ensuring that the written
JSON has the expected `format`
Writes blocks of JSON - encoded data into ` writer ` ensuring that the written JSON has the expected ` format `
pub fn write<W, F, I>(writer: &mut W, format: F, mut blocks: I) -> Result<()>
where
    W: std::io::Write,
    F: JsonFormat,
    I: FallibleStreamingIterator<Item = [u8], Error = ArrowError>,
{
    format.start_stream(writer)?;
    let mut is_first_row = true;
    while let Some(block) = blocks.next()? {
        format.start_row(writer, is_first_row)?;
        is_first_row = false;
        writer.write_all(block)?;
    }
    format.end_stream(writer)?;
    Ok(())
}
pub fn write < W , F , I > ( writer : & mut W , format : F , mut blocks : I ) -> Result < ( ) > where W : std :: io :: Write , F : JsonFormat , I : FallibleStreamingIterator < Item = [ u8 ] , Error = ArrowError > , { format . start_stream ( writer ) ? ; let mut is_first_row = true ; while let Some ( block ) = blocks . next ( ) ? { format . start_row ( writer , is_first_row ) ? ; is_first_row = false ; writer . write_all ( block ) ? ; } format . end_stream ( writer ) ? ; Ok ( ( ) ) }
Writes blocks of JSON-encoded data into `writer`, ensuring that the written
JSON has the expected `format`
Writes blocks of JSON - encoded data into ` writer ` ensuring that the written JSON has the expected ` format `
writer
&mut W
format
F
blocks
I
writer
&mut W
format
F
blocks
I