pub fn output_line(
    state: &SerialState<'_>,
    line: &str,
    output: &mut dyn Write
) -> Result<()>