pub fn write_to(
    file: &mut FileLock,
    iter: &mut dyn Iterator<Item = Data>
) -> Result<(), Error>