pub fn finish_write(
text: String,
rep: WriteReport,
strict: bool,
report: Option<&mut WriteReport>,
) -> Result<String, WriteError>Expand description
The standard strict/report handling every format writer applies to
its own accumulated WriteReport, mirroring Python’s finish_write.
If report is given, rep’s adjustments are copied into it. If strict
and rep has any adjustments, returns WriteError carrying rep.
Otherwise returns text.