Skip to main content

noodles_bcf/record/codec/encoder/site/
info.rs

1mod field;
2
3use std::io::{self, Write};
4
5use noodles_vcf::{self as vcf, header::StringMaps, variant::record::Info};
6
7use self::field::write_field;
8
9pub fn write_info<W, I>(
10    writer: &mut W,
11    header: &vcf::Header,
12    string_maps: &StringMaps,
13    info: I,
14) -> io::Result<()>
15where
16    W: Write,
17    I: Info,
18{
19    for result in info.iter(header) {
20        let (key, value) = result?;
21        write_field(writer, string_maps.strings(), key, value)?;
22    }
23
24    Ok(())
25}